83% mango-popup

Code Review | Mango Popup

WordPress plugin Mango Popup scored83%from 54 tests.

About plugin

  • Plugin page: mango-popup
  • Plugin version: 1.2.2
  • PHP compatiblity: 5.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9
  • WordPress version: 6.3.1
  • First release: Nov 8, 2017
  • Latest release: Aug 1, 2018
  • Number of updates: 14
  • Update frequency: every 19.0 days
  • Top authors: mangowp (71.43%)haonx (35.71%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,842 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.31MB] [CPU: ▼0.71ms] Passed 4 tests

Analyzing server-side resources used by Mango Popup
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2840.68 ▼0.60
Dashboard /wp-admin3.66 ▲0.3648.74 ▲4.21
Posts /wp-admin/edit.php3.71 ▲0.3646.69 ▼1.42
Add New Post /wp-admin/post-new.php6.20 ▲0.3186.77 ▼3.46
Media Library /wp-admin/upload.php3.52 ▲0.2940.73 ▲2.64
Popups /wp-admin/admin.php?page=mango_popup3.5740.40
Settings /wp-admin/admin.php?page=mango_popup_settings3.4937.80
Create Popup /wp-admin/admin.php?page=mango_popup_create3.5338.52

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 426 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Mango Popup
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,968 ▲23313.70 ▼0.687.24 ▲5.5040.69 ▼1.81
Dashboard /wp-admin2,239 ▲505.81 ▲0.93103.49 ▼13.5853.23 ▲13.61
Posts /wp-admin/edit.php2,125 ▲332.03 ▲0.0633.13 ▼12.5939.69 ▲4.33
Add New Post /wp-admin/post-new.php1,547 ▲1323.13 ▼0.10673.83 ▲7.8569.18 ▲16.22
Media Library /wp-admin/upload.php1,430 ▲424.21 ▼0.1593.88 ▼19.6051.82 ▲4.43
Popups /wp-admin/admin.php?page=mango_popup1,4193.9257.2648.40
Settings /wp-admin/admin.php?page=mango_popup_settings9042.0624.1749.22
Create Popup /wp-admin/admin.php?page=mango_popup_create1,1323.8747.16101.28

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-posts

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/mango-popup/includes/views/template.php:12

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: A description for screenshot #7 is required in mango-popup/assets to your readme.txt
The official readme.txt is a good inspiration

mango-popup/mango-popup.php 85% from 13 tests

The main file in "Mango Popup" v. 1.2.2 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Description: Please don't use more than 140 characters for the plugin description (currently 254 characters long)
  • Text Domain: Please use dashes and lowercase characters for text domains

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin41,987 lines of code in 328 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript254,16819,23116,369
CSS1071,0721297,708
Sass881,2491,5927,350
PHP348842,1073,995
SVG2002,959
LESS1434441,758
JSON37140854
Markdown73320697
HTML14222297

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity21.29
▷ Minimum class complexity1.00
▷ Maximum class complexity134.00
Average method complexity3.42
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces5
Interfaces0
Traits0
Classes24
▷ Abstract classes00.00%
▷ Concrete classes24100.00%
▷ Final classes00.00%
Methods189
▷ Static methods3216.93%
▷ Public methods15984.13%
▷ Protected methods42.12%
▷ Private methods2613.76%
Functions10
▷ Named functions220.00%
▷ Anonymous functions880.00%
Constants31
▷ Global constants2167.74%
▷ Class constants1032.26%
▷ Public constants10100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
43 PNG files occupy 0.93MB with 0.43MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
template/template-pro-4/assets/img/0.png2.36KB1.67KB▼ 29.14%
template/template-pro-6/assets/img/cat.png69.10KB74.37KB0.00%
template/template-pro-2/assets/img/0.png132.12KB34.43KB▼ 73.94%
assets/admin/img/position/slide_in_right_hover.png2.96KB1.30KB▼ 56.16%
template/template-pro-1/assets/img/clock.png58.03KB16.15KB▼ 72.17%