92% master-popups-lite

Code Review | Master Popups

WordPress plugin Master Popups scored 92% from 54 tests.

About plugin

  • Plugin page: master-popups-lite
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.4
  • WordPress version: 5.8.1
  • First release: May 3, 2019
  • Latest release: Apr 24, 2020
  • Number of updates: 24
  • Update frequency: every 14.9 days
  • Top authors: codexhelp (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

900+ active / 7,296 total downloads

Benchmarks

Plugin footprint 99% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲7.02MB] [CPU: ▼53.79ms] 50% from 4 tests

This is a short check of server-side resources used by Master Popups
It is recommended to improve the following
  • RAM: You should keep total memory usage under 10MB (currently 10.49MB on /wp-admin/edit.php?post_type=master-popups&page=settings-master-popups)
  • Extra RAM: Try to keep extra memory usage under 5MB (currently 7.02MB on /wp-admin/edit.php?post_type=master-popups&page=settings-master-popups)
PageMemory (MB)CPU Time (ms)
Home /10.44 ▲7.72144.66 ▲124.27
Dashboard /wp-admin10.49 ▲7.43166.06 ▲121.06
Posts /wp-admin/edit.php10.49 ▲7.38159.66 ▲117.54
Add New Post /wp-admin/post-new.php11.23 ▲5.79229.46 ▼546.69
Media Library /wp-admin/upload.php10.49 ▲7.49129.99 ▲92.95
New Popup /wp-admin/post-new.php?post_type=master-popups10.81231.03
All Popups /wp-admin/edit.php?post_type=master-popups10.49154.00
All Lists /wp-admin/edit.php?post_type=mpp_audience10.49162.51
General Settings /wp-admin/edit.php?post_type=master-popups&page=settings-master-popups10.49170.13

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 1,342 new files
Database: no new tables, no new options

Browser metrics 75% from 4 tests

This is an overview of browser requirements for Master Popups
Please improve the following
  • Nodes: For the best user experience, please reduce the number of DOM nodes under 25,000 (currently 27,192 on /wp-admin/post-new.php?post_type=master-popups)
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,928 ▲32216.25 ▲0.5514.32 ▲4.1251.97 ▲4.16
Dashboard /wp-admin3,040 ▲1035.93 ▼0.08132.32 ▼15.33127.49 ▲13.55
Posts /wp-admin/edit.php2,817 ▲782.59 ▼0.1269.76 ▲4.5198.16 ▲9.03
Add New Post /wp-admin/post-new.php1,554 ▼50715.14 ▼4.31368.54 ▼40.27124.33 ▲5.69
Media Library /wp-admin/upload.php1,828 ▲185.02 ▼0.03145.41 ▼5.41161.86 ▲38.88
New Popup /wp-admin/post-new.php?post_type=master-popups27,19214.40771.94342.07
All Popups /wp-admin/edit.php?post_type=master-popups1,9046.28132.9696.54
All Lists /wp-admin/edit.php?post_type=mpp_audience1,8806.04127.00103.05
General Settings /wp-admin/edit.php?post_type=master-popups&page=settings-master-popups2,9837.31185.37135.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Uninstaller ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means 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
  • 466× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'MasterPopups\\Benhawker\\Pipedrive\\Exceptions\\PipedriveException' not found in wp-content/plugins/master-popups-lite/libs/integrations/PipedriveAPI1/src/Exceptions/PipedriveMissingFieldError.php:3
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\OptionsResolver\\Options' not found in wp-content/plugins/master-popups-lite/libs/integrations/MailgunAPI1/vendor/symfony/options-resolver/OptionsResolver.php:27
    • > PHP Fatal error
      Uncaught Error: Class 'MPP_Mailgun\\Api\\HttpApi' not found in wp-content/plugins/master-popups-lite/libs/integrations/MailgunAPI1/vendor/mailgun/mailgun-php/src/MPP_Mailgun/Api/Suppression/Bounce.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'MPP_Mailgun\\Hydrator\\Hydrator' not found in wp-content/plugins/master-popups-lite/libs/integrations/MailgunAPI1/vendor/mailgun/mailgun-php/src/MPP_Mailgun/Hydrator/NoopHydrator.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'Symfony\\Component\\OptionsResolver\\Exception\\InvalidArgumentException' not found in wp-content/plugins/master-popups-lite/libs/integrations/MailgunAPI1/vendor/symfony/options-resolver/Exception/InvalidOptionsException.php:21
    • > PHP Fatal error
      Uncaught Error: Class 'MPP_Mailgun\\Model\\Tag\\Tag' not found in wp-content/plugins/master-popups-lite/libs/integrations/MailgunAPI1/vendor/mailgun/mailgun-php/src/MPP_Mailgun/Model/Tag/ShowResponse.php:17
    • > PHP Fatal error
      Uncaught Error: Class 'ConstantContactAPI2\\Components\\Component' not found in wp-content/plugins/master-popups-lite/libs/integrations/ConstantContactAPI2/Components/Tracking/OpenActivity.php:14
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\StreamInterface' not found in wp-content/plugins/master-popups-lite/libs/integrations/AutopilotAPI1/guzzlehttp/psr7/src/DroppingStream.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'ConstantContactAPI2\\Components\\Component' not found in wp-content/plugins/master-popups-lite/libs/integrations/ConstantContactAPI2/Components/EmailMarketing/TestSend.php:13
    • > PHP Fatal error
      Uncaught Error: Interface 'MasterPopups\\ConstantContact\\GuzzleHttp\\Post\\PostFileInterface' not found in wp-content/plugins/master-popups-lite/libs/integrations/ConstantContactAPI2/vendor/guzzlehttp/guzzle/src/Post/PostFile.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% 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
Attributes that require attention:
  • Screenshots: Please describe screenshot #9 in master-popups-lite/assets to your readme.txt
  • Tags: Please delete some tags, you are using 15 tag instead of maximum 10
The official readme.txt might help

master-popups-lite/master-popups-lite.php 92% from 13 tests

The primary PHP file in "Master Popups" version 1.0.3 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin133,421 lines of code in 1,050 files:
LanguageFilesBlank linesComment linesLines of code
PHP6669,81827,09153,423
JSON500031,417
CSS325,42455718,907
SVG2215222116,681
JavaScript751,45065311,370
PO File45968171,470
Sass1172144
make1409

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity10.70
▷ Minimum class complexity1.00
▷ Maximum class complexity215.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity77.00
Code structure
Namespaces99
Interfaces68
Traits18
Classes502
▷ Abstract classes142.79%
▷ Concrete classes48897.21%
▷ Final classes11924.39%
Methods3,842
▷ Static methods56214.63%
▷ Public methods3,31786.34%
▷ Protected methods882.29%
▷ Private methods43711.37%
Functions273
▷ Named functions8631.50%
▷ Anonymous functions18768.50%
Constants105
▷ Global constants1413.33%
▷ Class constants9186.67%
▷ Public constants91100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
131 PNG files occupy 0.89MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/admin/images/integrations/newsman.png5.05KB2.76KB▼ 45.40%
assets/admin/images/integrations/simply_cast.png2.14KB1.85KB▼ 13.68%
assets/admin/images/integrations/benchmark2.png3.56KB2.55KB▼ 28.39%
assets/admin/images/default-image.png1.14KB0.64KB▼ 43.99%
assets/images/letter-border.png1.53KB1.27KB▼ 17.24%