89% perfbar

Code Review | PerfBar

WordPress plugin PerfBar scored89%from 54 tests.

About plugin

  • Plugin page: perfbar
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2014
  • Latest release: Oct 5, 2014
  • Number of updates: 3
  • Update frequency: every 0.7 days
  • Top authors: samio99 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /773 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.15MB] [CPU: ▼10.68ms] Passed 4 tests

Server-side resources used by PerfBar
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1123.02 ▼19.27
Dashboard /wp-admin3.46 ▲0.1648.56 ▼4.27
Posts /wp-admin/edit.php3.57 ▲0.2248.96 ▼5.75
Add New Post /wp-admin/post-new.php6.04 ▲0.1587.23 ▼13.31
Media Library /wp-admin/upload.php3.38 ▲0.1633.45 ▼4.40
PerfBar /wp-admin/options-general.php?page=perf-bar3.3533.29

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for PerfBar
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,126 ▲36514.77 ▲0.324.32 ▲2.5147.34 ▲1.31
Dashboard /wp-admin2,222 ▲165.83 ▼0.02105.54 ▼12.8037.43 ▼8.81
Posts /wp-admin/edit.php2,101 ▲12.04 ▼0.0235.89 ▼4.9936.00 ▲1.86
Add New Post /wp-admin/post-new.php1,547 ▲1623.12 ▲0.01636.37 ▼88.8861.33 ▼3.80
Media Library /wp-admin/upload.php1,401 ▲14.20 ▼0.0799.13 ▼3.6344.75 ▼1.70
PerfBar /wp-admin/options-general.php?page=perf-bar1,1352.0521.7631.28

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
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 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
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
Attributes that require attention:
  • Plugin Name: You should set the name of your plugin on the first line ( === perfbar === )
The official readme.txt might help

perfbar/perf-bar.php 92% from 13 tests

This is the main PHP file of "PerfBar" version 1.0.1, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("perfbar.php" instead of "perf-bar.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Everything looks great! No dangerous files found in this plugin1,356 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript221336887
PHP7143359469

PHP code Passed 2 tests

Analyzing 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.24
Average class complexity10.50
▷ Minimum class complexity1.00
▷ Maximum class complexity33.00
Average method complexity1.86
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods44
▷ Static methods00.00%
▷ Public methods4090.91%
▷ Protected methods00.00%
▷ Private methods49.09%
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin