84% smart-attachment-page-remove

Code Review | Smart Attachment Page Remove

WordPress plugin Smart Attachment Page Remove scored84%from 54 tests.

About plugin

  • Plugin page: smart-attachment-...
  • Plugin version: 4.0.3
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.3
  • WordPress version: 6.3.1
  • First release: Jan 3, 2017
  • Latest release: Oct 12, 2023
  • Number of updates: 33
  • Update frequency: every 74.9 days
  • Top authors: petersplugins (100%)

Code review

54 tests

User reviews

13 reviews

Install metrics

1,000+ active /12,668 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼11.40ms] Passed 4 tests

Server-side resources used by Smart Attachment Page Remove
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.05 ▼11.02
Dashboard /wp-admin3.40 ▲0.0650.04 ▼13.52
Posts /wp-admin/edit.php3.45 ▲0.1050.55 ▼1.73
Add New Post /wp-admin/post-new.php5.92 ▲0.0384.71 ▼19.32
Media Library /wp-admin/upload.php3.26 ▲0.0342.53 ▲4.40
Attachment Pages /wp-admin/options-general.php?page=smartattachmentpageremovesettings3.2333.76

Server storage [IO: ▲0.08MB] [DB: ▲0.00MB] Passed 3 tests

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 29 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
smart_attachment_page_remove_data
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

Smart Attachment Page Remove: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.30 ▼0.141.68 ▼0.1143.31 ▲3.20
Dashboard /wp-admin2,196 ▲225.64 ▲0.0788.34 ▼0.7037.88 ▼7.46
Posts /wp-admin/edit.php2,104 ▲72.04 ▼0.0036.95 ▼3.4934.58 ▼5.57
Add New Post /wp-admin/post-new.php1,534 ▼1223.16 ▼0.06662.40 ▼7.0759.30 ▲0.66
Media Library /wp-admin/upload.php1,395 ▼84.20 ▲0.0498.43 ▼13.4843.43 ▼5.61
Attachment Pages /wp-admin/options-general.php?page=smartattachmentpageremovesettings8452.2428.7736.88

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] 75% from 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/smart-attachment-page-remove/inc/ppf/ppf-plugin.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/smart-attachment-page-remove/inc/ppf/ppf-settings.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Plugin' not found in wp-content/plugins/smart-attachment-page-remove/inc/ppf/ppf-plugin-addon.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_Class' not found in wp-content/plugins/smart-attachment-page-remove/inc/ppf/ppf-subclass.php:16
    • > PHP Fatal error
      Uncaught Error: Class 'PPF08_SubClass' not found in wp-content/plugins/smart-attachment-page-remove/inc/ppf/ppf-admin.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
5 plugin tags: spam, attachment pages, attachment page, classicpress, antispam comment spam

smart-attachment-page-remove/smart-attachment-page-remove.php Passed 13 tests

The primary PHP file in "Smart Attachment Page Remove" version 4.0.3 is used by WordPress to initiate all plugin functionality
49 characters long description:
Completely remove Attachment Pages from your Blog

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Everything looks great! No dangerous files found in this plugin1,065 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP146801,029739
CSS1510231
JavaScript2352290
SVG5005

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.26
Average class complexity7.33
▷ Minimum class complexity1.00
▷ Maximum class complexity40.00
Average method complexity1.51
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes666.67%
▷ Concrete classes333.33%
▷ Final classes00.00%
Methods88
▷ Static methods11.14%
▷ Public methods7686.36%
▷ Protected methods55.68%
▷ Private methods77.95%
Functions6
▷ Named functions116.67%
▷ Anonymous functions583.33%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG files were detected