84% business-pack

Code Review | Business pack

WordPress plugin Business pack scored84%from 54 tests.

About plugin

  • Plugin page: business-pack
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1.0-5.6.2
  • WordPress version: 6.3.1
  • First release: Mar 14, 2017
  • Latest release: Mar 8, 2021
  • Number of updates: 7
  • Update frequency: every 209.6 days
  • Top authors: shramee (85.71%)PootlePress (28.57%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active /2,386 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
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.05MB] [CPU: ▼5.00ms] Passed 4 tests

Analyzing server-side resources used by Business pack
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0539.18 ▼1.18
Dashboard /wp-admin3.35 ▲0.0551.07 ▲0.81
Posts /wp-admin/edit.php3.46 ▲0.1143.91 ▼8.31
Add New Post /wp-admin/post-new.php5.93 ▲0.0593.75 ▼11.31
Media Library /wp-admin/upload.php3.27 ▲0.0535.39 ▲1.21

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Business pack
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5414.48 ▲0.242.26 ▲0.4942.18 ▼1.54
Dashboard /wp-admin2,206 ▲185.83 ▲0.92101.31 ▼7.4335.70 ▼10.59
Posts /wp-admin/edit.php2,086 ▼62.02 ▲0.0138.72 ▲1.2933.37 ▲2.54
Add New Post /wp-admin/post-new.php1,542 ▲918.22 ▼5.05597.17 ▼77.8451.96 ▼9.46
Media Library /wp-admin/upload.php1,385 ▼64.17 ▼0.0897.49 ▼4.2245.74 ▲0.26

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/business-pack/ppb-business-pack.php:110

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

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • Donate link: Invalid URI ("")
Please take inspiration from this readme.txt

business-pack/ppb-business-pack.php 92% from 13 tests

"Business pack" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("business-pack.php" instead of "ppb-business-pack.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Good job! No executable or dangerous file extensions detected506 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP357210261
CSS22516136
JavaScript21617109

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity5.67
▷ Minimum class complexity3.00
▷ Maximum class complexity10.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods21
▷ Static methods314.29%
▷ Public methods1361.90%
▷ Protected methods29.52%
▷ Private methods628.57%
Functions0
▷ Named functions00.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
No PNG files were detected