84% page-edit-toolbar

Code Review | Page Edit Toolbar

WordPress plugin Page Edit Toolbar scored84%from 54 tests.

About plugin

  • Plugin page: page-edit-toolbar
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Oct 8, 2013
  • Latest release: Jul 13, 2014
  • Number of updates: 7
  • Update frequency: every 39.7 days
  • Top authors: endocreative (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

60+ active /2,242 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼4.06ms] Passed 4 tests

A check of server-side resources used by Page Edit Toolbar
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.12 ▼1.93
Dashboard /wp-admin3.32 ▲0.0247.34 ▼1.54
Posts /wp-admin/edit.php3.37 ▲0.0244.24 ▼4.05
Add New Post /wp-admin/post-new.php5.90 ▲0.0181.87 ▼8.72
Media Library /wp-admin/upload.php3.25 ▲0.0233.96 ▼0.73

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Page Edit Toolbar
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▲5414.44 ▼0.311.74 ▼0.2839.59 ▼1.78
Dashboard /wp-admin2,220 ▲295.84 ▲0.9497.56 ▼12.9240.05 ▼2.51
Posts /wp-admin/edit.php2,103 ▲142.01 ▼0.0139.64 ▼0.3134.34 ▼0.81
Add New Post /wp-admin/post-new.php1,541 ▲823.32 ▲0.19674.98 ▲11.4564.99 ▲15.26
Media Library /wp-admin/upload.php1,402 ▲204.20 ▲0.0095.44 ▼5.6940.27 ▼2.21

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
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/page-edit-toolbar/page-edit-toolbar.php:12

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 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
Please fix the following attributes:
  • Screenshots: Please add an image for screenshot #1 (The dropdown shows the 15 most recently modified pages.)
Please take inspiration from this readme.txt

page-edit-toolbar/page-edit-toolbar.php Passed 13 tests

The main PHP file in "Page Edit Toolbar" ver. 1.2 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Adds most recently edited pages to the WordPress Toolbar for easy access

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin29 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1141229

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.11
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png31.81KB10.28KB▼ 67.68%