84% stop-automatic-updates

Code Review | Stop Automatic Updates

WordPress plugin Stop Automatic Updates scored84%from 54 tests.

About plugin

  • Plugin page: stop-automatic-up...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7.0-5.0
  • WordPress version: 6.3.1
  • First release: Dec 18, 2018
  • Latest release: Dec 18, 2018
  • Number of updates: 2
  • Update frequency: every 2.5 days
  • Top authors: foack (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /617 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
Installer ran successfully

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

An overview of server-side resources used by Stop Automatic Updates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0542.57 ▲0.80
Dashboard /wp-admin3.35 ▲0.0146.55 ▼9.70
Posts /wp-admin/edit.php3.46 ▲0.1146.96 ▲2.76
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.36 ▼4.67
Media Library /wp-admin/upload.php3.27 ▲0.0433.51 ▲1.35

Server storage [IO: ▲0.04MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 22 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Stop Automatic Updates: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲14113.92 ▼0.517.57 ▲5.8538.15 ▼1.86
Dashboard /wp-admin2,210 ▲225.84 ▲0.9196.26 ▼3.8037.91 ▼2.57
Posts /wp-admin/edit.php2,096 ▲72.01 ▼0.0240.44 ▲4.6834.05 ▼4.38
Add New Post /wp-admin/post-new.php1,527 ▲1018.14 ▲0.58612.89 ▼10.5960.66 ▲9.19
Media Library /wp-admin/upload.php1,386 ▲44.17 ▼0.0894.48 ▼2.7843.69 ▲0.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for 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: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/stop-automatic-updates/admin/partials/stop-automatic-updates-admin-display.php
    • > /wp-content/plugins/stop-automatic-updates/public/partials/stop-automatic-updates-public-display.php

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === stop-automatic-updates === )
Please take inspiration from this readme.txt

stop-automatic-updates/stop-automatic-updates.php Passed 13 tests

The principal PHP file in "Stop Automatic Updates" v. 1.0.0 is loaded by WordPress automatically on each request
96 characters long description:
This is a short description of what the plugin does. It's displayed in the WordPress admin area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected173 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12118536167
JavaScript24546
CSS2080

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.08
Average class complexity1.43
▷ Minimum class complexity1.00
▷ Maximum class complexity3.00
Average method complexity1.13
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods23
▷ Static methods28.70%
▷ Public methods1878.26%
▷ Protected methods00.00%
▷ Private methods521.74%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.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