82% mobipromo

Code Review | MobiPromo

WordPress plugin MobiPromo scored 82% from 54 tests.

About plugin

  • Plugin page: mobipromo
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-4.7.3
  • WordPress version: 5.8.1
  • First release: Mar 24, 2017
  • Latest release: Mar 24, 2017
  • Number of updates: 2
  • Update frequency: every 1.0 days
  • Top authors: websempai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 328 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

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

This is a short check of server-side resources used by MobiPromo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.74 ▲0.0226.54 ▲5.45
Dashboard /wp-admin3.08 ▲0.0246.93 ▼2.46
Posts /wp-admin/edit.php3.13 ▲0.0247.98 ▲2.97
Add New Post /wp-admin/post-new.php5.43 ▼0.0090.39 ▼593.33
Media Library /wp-admin/upload.php3.02 ▲0.0235.93 ▲1.98
MobiPromo /wp-admin/options-general.php?page=mobipromo-settings2.9729.96

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 4 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

MobiPromo: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8815.86 ▲0.2310.44 ▼0.0347.66 ▼3.06
Dashboard /wp-admin2,975 ▲385.91 ▼0.12147.32 ▲0.24113.84 ▲5.74
Posts /wp-admin/edit.php2,744 ▲52.70 ▼0.0271.45 ▲6.5390.55 ▲2.30
Add New Post /wp-admin/post-new.php1,673 ▲9219.12 ▼1.18406.98 ▼57.88107.50 ▼15.27
Media Library /wp-admin/upload.php1,815 ▲85.02 ▼0.00161.04 ▼7.60120.27 ▲1.53
MobiPromo /wp-admin/options-general.php?page=mobipromo-settings1,1182.1055.9283.74

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=mobipromo-settings
    • > Notice in wp-content/plugins/mobipromo/admin.php+40
    Trying to access array offset on value of type bool

SRP 0% 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 take a closer look at the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/mobipromo/mobipromo.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/mobipromo/admin.php:4

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 on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: Screenshot #1 (MobiPromo settings (where you set your website verification key)) image missing
Please take inspiration from this readme.txt

mobipromo/mobipromo.php 92% from 13 tests

"MobiPromo" version 1.0.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 152 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
No dangerous file extensions were detected85 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2252985

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
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%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.07MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png70.16KB74.86KB0.00%