83% prepare-new-version

Code Review | Prepare New Version

WordPress plugin Prepare New Version scored83%from 54 tests.

About plugin

  • Plugin page: prepare-new-version
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.0
  • WordPress version: 6.3.1
  • First release: Sep 25, 2013
  • Latest release: Sep 9, 2014
  • Number of updates: 23
  • Update frequency: every 15.2 days
  • Top authors: globalis (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

10,000+ active /3,141 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

A check of server-side resources used by Prepare New Version
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0238.19 ▼2.01
Dashboard /wp-admin3.36 ▲0.0248.87 ▼22.97
Posts /wp-admin/edit.php3.48 ▲0.1352.03 ▲0.41
Add New Post /wp-admin/post-new.php5.95 ▲0.06105.56 ▲0.69
Media Library /wp-admin/upload.php3.28 ▲0.0534.36 ▼3.01

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
can_compress_scripts
theysaidso_admin_options
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Prepare New Version
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.30 ▼0.081.77 ▲0.0640.42 ▼0.80
Dashboard /wp-admin2,195 ▲185.64 ▼0.0388.49 ▼0.5238.91 ▼2.73
Posts /wp-admin/edit.php2,118 ▲212.02 ▼0.0339.91 ▲3.6535.09 ▼0.98
Add New Post /wp-admin/post-new.php6,244 ▲4,71825.99 ▲8.37882.49 ▲132.5656.53 ▲4.37
Media Library /wp-admin/upload.php1,397 ▼34.23 ▼0.0897.35 ▼15.5343.96 ▼3.52

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/prepare-new-version/template/submit_meta_box.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/prepare-new-version/include/config.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _x() in wp-content/plugins/prepare-new-version/include/lang.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'PNV' not found in wp-content/plugins/prepare-new-version/template/duplicata_meta_box.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/prepare-new-version/include/config.php:5

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Tags: Please delete some tags, you are using 11 tag instead of maximum 10
The official readme.txt is a good inspiration

prepare-new-version/prepare_new_version.php 85% from 13 tests

The principal PHP file in "Prepare New Version" v. 1.0 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.5" instead of "3.6.0")
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("prepare-new-version.php" instead of "prepare_new_version.php")

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
Everything looks great! No dangerous files found in this plugin624 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP7144204524
PO File1232575
CSS10016
JavaScript1109

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity28.67
▷ Minimum class complexity2.00
▷ Maximum class complexity48.00
Average method complexity3.37
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods35
▷ Static methods3497.14%
▷ Public methods3394.29%
▷ Protected methods12.86%
▷ Private methods12.86%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants29
▷ Global constants29100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There are no PNG files in this plugin