78% wp-disabler

Code Review | Wp Disabler

WordPress plugin Wp Disabler scored 78% from 54 tests.

About plugin

  • Plugin page: wp-disabler
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 13, 2019
  • Latest release: Nov 13, 2019
  • Number of updates: 11
  • Update frequency: every 14.0 days
  • Top authors: istiyakamin (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

600+ active / 2,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲1.46MB] [CPU: ▲5.76ms] Passed 4 tests

This is a short check of server-side resources used by Wp Disabler
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.81 ▲1.3543.63 ▲3.07
Dashboard /wp-admin4.84 ▲1.5350.16 ▲4.43
Posts /wp-admin/edit.php4.89 ▲1.5353.04 ▲8.19
Add New Post /wp-admin/post-new.php7.37 ▲1.49101.26 ▲8.53
Media Library /wp-admin/upload.php4.70 ▲1.4741.18 ▲7.33
Wp Disaber /wp-admin/admin.php?page=wp_disabler8.9469.19
Style /wp-admin/admin.php?page=style8.7964.33

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 237 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Wp Disabler
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲20814.01 ▼0.375.52 ▲3.8138.76 ▼2.67
Dashboard /wp-admin2,237 ▲454.91 ▼0.04108.77 ▲1.0240.55 ▲0.49
Posts /wp-admin/edit.php2,120 ▲312.02 ▼0.0239.50 ▲5.0837.13 ▲2.94
Add New Post /wp-admin/post-new.php1,554 ▲4018.52 ▲0.96592.46 ▼110.5767.33 ▼1.44
Media Library /wp-admin/upload.php1,422 ▲344.22 ▲0.0394.45 ▼18.5342.40 ▼3.99
Wp Disaber /wp-admin/admin.php?page=wp_disabler1,3592.2932.6367.90
Style /wp-admin/admin.php?page=style1,2152.5446.6343.19

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/wp-disabler/public/partials/plugin-name-public-display.php
  • 199× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Form_View___Attribute_Base' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/_view/attribute/AdminPageFramework_Form_View___Attribute_SectionsTablesContainer.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/admin_page/_view/AdminPageFramework_View__PageRenderer__ScreenIcon.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Form_Base' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/_view/sectionset/AdminPageFramework_Form_View___CollapsibleSectionTitle.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Form_View___CSS_Base' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/_view/css/AdminPageFramework_Form_View___CSS_ToolTip.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_Model__FormSubmission__Validator_Base' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/admin_page/_model/delegate/validaor/AdminPageFramework_Model__FormSubmission__Validator__ContactFormConfirm.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/notice/AdminPageFramework_Form___SubmitNotice.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/admin_page/_model/delegate/AdminPageFramework_Model__FormEmailHandler.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FrameworkUtility' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/_model/AdminPageFramework_Form_Model___FieldTypeRegistration.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_FieldType' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/_common/form/field_type/AdminPageFramework_FieldType_posttype.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'AdminPageFramework_TaxonomyField_Controller' not found in wp-content/plugins/wp-disabler/admin/lib/apf/factory/term_meta/AdminPageFramework_TermMeta.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5, #6 in wp-disabler/assets to your readme.txt
Please take inspiration from this readme.txt

wp-disabler/wp-disabler.php 92% from 13 tests

"Wp Disabler" version 1.2.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin16,370 lines of code in 230 files:
LanguageFilesBlank linesComment linesLines of code
PHP2269542,12216,245
CSS2162794
JavaScript22511431

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.31
Average class complexity6.98
▷ Minimum class complexity1.00
▷ Maximum class complexity159.00
Average method complexity2.16
▷ Minimum method complexity1.00
▷ Maximum method complexity26.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes331
▷ Abstract classes9328.10%
▷ Concrete classes23871.90%
▷ Final classes20.84%
Methods1,707
▷ Static methods24414.29%
▷ Public methods95255.77%
▷ Protected methods27416.05%
▷ Private methods48128.18%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants214.29%
▷ Class constants1285.71%
▷ Public constants12100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected