84% sp-disable-site

Code Review | SP Disable Site

WordPress plugin SP Disable Site scored 84% from 54 tests.

About plugin

  • Plugin page: sp-disable-site
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.0.3
  • WordPress version: 6.3.1
  • First release: Jan 28, 2019
  • Latest release: Jan 28, 2019
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: spoot1986 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

60+ active / 1,321 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.05ms] Passed 4 tests

Analyzing server-side resources used by SP Disable Site
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0437.06 ▼6.21
Dashboard /wp-admin3.33 ▲0.0345.64 ▼5.04
Posts /wp-admin/edit.php3.45 ▲0.0949.15 ▲3.54
Add New Post /wp-admin/post-new.php5.91 ▲0.0395.68 ▼7.21
Media Library /wp-admin/upload.php3.26 ▲0.0336.28 ▲2.26

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 8 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

SP Disable Site: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6514.48 ▲0.101.64 ▼0.1744.26 ▲0.50
Dashboard /wp-admin2,206 ▲184.85 ▼0.2696.97 ▼8.3539.45 ▼5.68
Posts /wp-admin/edit.php2,092 ▲32.16 ▲0.1438.60 ▲4.0835.99 ▲3.38
Add New Post /wp-admin/post-new.php1,547 ▲1123.38 ▲0.30626.49 ▼26.1766.40 ▲14.49
Media Library /wp-admin/upload.php1,385 ▼64.21 ▼0.0293.16 ▼6.8440.44 ▼2.73

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/sp-disable-site/sp-disable-site.php:14
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/sp-disable-site/sp-disable-site-template.php:2

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)
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: site not work, disable site

sp-disable-site/sp-disable-site.php 92% from 13 tests

The main PHP file in "SP Disable Site" ver. 1.0.0 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected178 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP32419105
PO File1102539
CSS14034

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.57
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods7
▷ Static methods00.00%
▷ Public methods7100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
PNG images were not found in this plugin