94% wp-show-on-mobile

Code Review | WP Show On Mobile

WordPress plugin WP Show On Mobile scored 94% from 54 tests.

About plugin

  • Plugin page: wp-show-on-mobile
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-4.8
  • WordPress version: 5.8.1
  • First release: Jul 2, 2016
  • Latest release: Aug 5, 2016
  • Number of updates: 6
  • Update frequency: every 56.8 days
  • Top authors: dogano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 943 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼146.70ms] Passed 4 tests

Server-side resources used by WP Show On Mobile
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.85 ▲0.1333.89 ▲14.34
Dashboard /wp-admin3.07 ▲0.0236.79 ▼7.29
Posts /wp-admin/edit.php3.12 ▲0.0140.04 ▼13.05
Add New Post /wp-admin/post-new.php5.43 ▼0.0081.84 ▼566.55
Media Library /wp-admin/upload.php3.02 ▲0.0133.04 ▲0.10

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

Input-output and database impact of this plugin
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

Checking browser requirements for WP Show On Mobile
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,679 ▲4215.92 ▲0.339.64 ▼0.3446.32 ▼2.80
Dashboard /wp-admin2,970 ▲365.85 ▼0.12131.71 ▼5.62106.92 ▼10.47
Posts /wp-admin/edit.php2,739 ▼02.72 ▲0.0169.98 ▲6.1288.31 ▼11.54
Add New Post /wp-admin/post-new.php1,615 ▼6821.92 ▲3.43280.11 ▼96.95108.23 ▲0.13
Media Library /wp-admin/upload.php1,807 ▼05.00 ▼0.03152.21 ▲0.03113.49 ▲1.55

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The plugin uninstalled completely, with no zombie files or tables

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Almost there! Just fix the following items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wp-show-on-mobile/wp-show-on-mobile.php:32

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Please fix the following attributes:
  • Contributors: Plugin contributors field is missing
You can take inspiration from this readme.txt

wp-show-on-mobile/wp-show-on-mobile.php 92% from 13 tests

The entry point to "WP Show On Mobile" version 1.0.0 is a PHP file that has certain tags in its header comment area
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 226 characters long)

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
There were no executable files found in this plugin68 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP148168

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.24
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%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There were not PNG files found in your plugin