83% protect-version-controlled-updates

Code Review | Protect Version Controlled Updates

WordPress plugin Protect Version Controlled Updates scored 83% from 54 tests.

About plugin

  • Plugin page: protect-version-c...
  • Plugin version: 1.1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.2-4.5.2
  • WordPress version: 5.8.1
  • First release: Jun 3, 2016
  • Latest release: Jun 21, 2016
  • Number of updates: 4
  • Update frequency: every 4.5 days
  • Top authors: RobertGillmer (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 421 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

An overview of server-side resources used by Protect Version Controlled Updates
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.1638.08 ▲19.50
Dashboard /wp-admin3.11 ▲0.0543.48 ▲7.31
Posts /wp-admin/edit.php3.16 ▲0.0545.45 ▲2.17
Add New Post /wp-admin/post-new.php5.46 ▲0.0385.62 ▼582.32
Media Library /wp-admin/upload.php3.05 ▲0.0533.06 ▲0.68
PVCU Options /wp-admin/options-general.php?page=pvcu-options3.0230.41

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 13 new files
Database: no new tables, 1 new option
New WordPress options
pvcu_return

Browser metrics Passed 4 tests

An overview of browser requirements for Protect Version Controlled Updates
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8915.86 ▼0.127.17 ▼1.3045.53 ▼5.28
Dashboard /wp-admin2,978 ▲475.89 ▼0.10130.89 ▼18.81112.68 ▼1.00
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0062.90 ▼7.5589.76 ▼2.62
Add New Post /wp-admin/post-new.php1,501 ▼18219.00 ▲0.26364.55 ▼10.25108.62 ▲6.30
Media Library /wp-admin/upload.php1,753 ▼544.99 ▼0.00144.36 ▼6.84113.77 ▼0.47
PVCU Options /wp-admin/options-general.php?page=pvcu-options1,1482.1056.6482.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 1 option in the database
    • pvcu_return

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

SRP 50% 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
The following issues need your attention
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/protect-version-controlled-updates/pvcu-options-page.php:20
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/protect-version-controlled-updates/pvcu-activation.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/protect-version-controlled-updates/pvcu-modal-output.php:83
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/protect-version-controlled-updates/pvcu-activation.php:47
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/protect-version-controlled-updates/pvcu-scripts.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
3 plugin tags: version control, git, prevent updates

protect-version-controlled-updates/pvcu-main.php 77% from 13 tests

"Protect Version Controlled Updates" version 1.1.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("protect-version-controlled-updates.php" instead of "pvcu-main.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 202 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected2,300 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
CSS1141,275
JSON100395
JavaScript310468342
PHP7111209288

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.16
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There are no PNG files in this plugin