84% better-plugins

Code Review | Better Plugins Plugin

WordPress plugin Better Plugins Plugin scored84%from 54 tests.

About plugin

  • Plugin page: better-plugins
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.3
  • WordPress version: 6.3.1
  • First release: Sep 2, 2015
  • Latest release: Sep 5, 2015
  • Number of updates: 4
  • Update frequency: every 0.8 days
  • Top authors: kingkool68 (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

20+ active /1,971 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Better Plugins Plugin
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0035.54 ▼6.70
Dashboard /wp-admin3.35 ▲0.0543.50 ▼4.16
Posts /wp-admin/edit.php3.40 ▲0.0544.00 ▼1.99
Add New Post /wp-admin/post-new.php5.93 ▲0.0581.73 ▼15.04
Media Library /wp-admin/upload.php3.27 ▲0.0535.35 ▲2.49
Compare /wp-admin/plugins.php?page=bpp-compare-site-plugins3.2431.13

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 7 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Better Plugins Plugin
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲3313.25 ▼1.401.68 ▼0.5040.53 ▼3.78
Dashboard /wp-admin2,210 ▲224.87 ▼0.0398.68 ▼21.8437.76 ▼6.17
Posts /wp-admin/edit.php2,096 ▲72.03 ▼0.0040.77 ▲0.3333.96 ▲1.49
Add New Post /wp-admin/post-new.php1,531 ▼223.21 ▲4.80672.50 ▲53.7353.29 ▲4.32
Media Library /wp-admin/upload.php1,392 ▲14.21 ▼0.01102.23 ▲4.7046.84 ▲2.61
Compare /wp-admin/plugins.php?page=bpp-compare-site-plugins7822.0523.9725.35

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
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-plugins/better-plugins-plugin.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-plugins/bpp-plugins-report.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/better-plugins/bpp-compare-site-plugins.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
7 plugin tags: tools, management, plugins, admin, productivity...

better-plugins/better-plugins-plugin.php 92% from 13 tests

"Better Plugins Plugin" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("better-plugins.php" instead of "better-plugins-plugin.php")

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
Success! There were no dangerous files found in this plugin503 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP3104100474
Markdown114015
CSS10014

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity36.50
▷ Minimum class complexity22.00
▷ Maximum class complexity51.00
Average method complexity4.55
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods20
▷ Static methods00.00%
▷ Public methods20100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
There were not PNG files found in your plugin