84% business-master

Code Review | Business Master

WordPress plugin Business Master scored84%from 54 tests.

About plugin

  • Plugin page: business-master
  • Plugin version: 0.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8.1-4.1
  • WordPress version: 6.3.1
  • First release: Oct 2, 2014
  • Latest release: Jun 15, 2016
  • Number of updates: 29
  • Update frequency: every 30.1 days
  • Top authors: fpcorso (89.66%)webstartup (13.79%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,299 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.24ms] Passed 4 tests

This is a short check of server-side resources used by Business Master
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0135.54 ▼2.82
Dashboard /wp-admin3.28 ▼0.0242.27 ▼7.42
Posts /wp-admin/edit.php3.36 ▲0.0144.55 ▼3.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0182.11 ▼10.85
Media Library /wp-admin/upload.php3.24 ▲0.0134.83 ▼3.69

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 14 new files
Database: 1 new table, 8 new options
New tables
wp_mlw_bm_stats
New WordPress options
widget_recent-comments
widget_recent-posts
theysaidso_admin_options
mlw_bm_version
can_compress_scripts
db_upgraded
mlw_advert_shows
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Business Master
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,903 ▲16813.28 ▼1.151.64 ▲0.0038.77 ▼2.59
Dashboard /wp-admin2,312 ▲1245.86 ▲0.9696.57 ▼14.3085.10 ▲40.46
Posts /wp-admin/edit.php2,105 ▲162.01 ▲0.0134.85 ▼2.3132.01 ▼1.06
Add New Post /wp-admin/post-new.php1,555 ▲2718.22 ▼0.07597.39 ▼61.5055.05 ▼1.37
Media Library /wp-admin/upload.php1,401 ▲164.20 ▼0.02108.10 ▼7.7343.86 ▼4.73

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
  • The uninstall procedure has failed, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • mlw_advert_shows
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-master/includes/bm_dashboard_widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/business-master/includes/bm_dashboard_widgets.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function delete_option() in wp-content/plugins/business-master/uninstall.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
5 plugin tags: views, admin, business, stats, uniques

business-master/mlw_businessMaster.php 92% from 13 tests

"Business Master" version 0.2.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("business-master.php" instead of "mlw_businessMaster.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
Good job! No executable or dangerous file extensions detected4,174 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript15013662,512
PHP7145381,659
Markdown1103

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions32
▷ Named functions32100.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
4 PNG files occupy 0.19MB with 0.11MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
includes/images/red_triangle.png10.84KB2.75KB▼ 74.66%
includes/images/green_triangle.png8.50KB2.75KB▼ 67.70%
assets/screenshot-1.png73.47KB37.92KB▼ 48.38%
assets/screenshot-2.png96.84KB51.60KB▼ 46.72%