83% showmb

Code Review | ShowMB

WordPress plugin ShowMB scored 83% from 54 tests.

About plugin

  • Plugin page: showmb
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 1.0-4.8.1
  • WordPress version: 5.8.1
  • First release: Sep 14, 2017
  • Latest release: Sep 15, 2017
  • Number of updates: 9
  • Update frequency: every 0.1 days
  • Top authors: showmb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 408 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼144.30ms] Passed 4 tests

An overview of server-side resources used by ShowMB
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.87 ▲0.0434.38 ▼5.04
Dashboard /wp-admin3.09 ▲0.0344.17 ▼4.51
Posts /wp-admin/edit.php3.14 ▲0.0342.50 ▼5.55
Add New Post /wp-admin/post-new.php5.44 ▲0.0191.18 ▼562.09
Media Library /wp-admin/upload.php3.03 ▲0.0336.13 ▲1.84

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 85 new files
Database: no new tables, 1 new option
New WordPress options
widget_smb_widget

Browser metrics Passed 4 tests

Checking browser requirements for ShowMB
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,812 ▲24016.25 ▲0.3413.55 ▲2.4349.70 ▲3.15
Dashboard /wp-admin2,970 ▲345.85 ▼0.12153.88 ▼0.77112.32 ▼7.28
Posts /wp-admin/edit.php2,739 ▼02.70 ▲0.0068.00 ▼0.4084.77 ▼2.74
Add New Post /wp-admin/post-new.php1,672 ▼1118.88 ▲0.14402.43 ▲25.24111.73 ▲9.60
Media Library /wp-admin/upload.php1,807 ▼05.05 ▲0.02172.17 ▼12.98114.44 ▼8.31

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
These items require your attention
  • This plugin does not fully uninstall, leaving 1 option in the database
    • widget_smb_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
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
The following issues need your attention
  • 2× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/showmb/includes/widget.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/showmb/smb.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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:
  • Tags: Too many tags (20 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Screenshots: Add descriptions for screenshots #2, #4, #6, #8, #9 in showmb/assets to your readme.txt
You can look at the official readme.txt

showmb/smb.php 92% from 13 tests

This is the main PHP file of "ShowMB" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("showmb.php" instead of "smb.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
There were no executable files found in this plugin9,313 lines of code in 55 files:
LanguageFilesBlank linesComment linesLines of code
SVG2002,685
CSS321172,453
Sass1434341,768
LESS1434441,758
PO File1995133466
JavaScript1278114
PHP2291269

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG images were found in this plugin