72% popup-ads-management

Code Review | Popup Ads Management

WordPress plugin Popup Ads Management scored72%from 54 tests.

About plugin

  • Plugin page: popup-ads-management
  • Plugin version: 0.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.2.2
  • WordPress version: 6.3.1
  • First release: Jun 1, 2015
  • Latest release: Jun 2, 2015
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: shahalom (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,391 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.12MB] [CPU: ▲0.14ms] Passed 4 tests

This is a short check of server-side resources used by Popup Ads Management
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1242.03 ▲1.84
Dashboard /wp-admin3.42 ▲0.1249.06 ▼1.44
Posts /wp-admin/edit.php3.54 ▲0.1847.13 ▼3.36
Add New Post /wp-admin/post-new.php6.03 ▲0.14100.04 ▲3.50
Media Library /wp-admin/upload.php3.35 ▲0.1239.74 ▲6.29
Add New /wp-admin/post-new.php?post_type=popup-ads3.4754.86
Popup Ads /wp-admin/edit.php?post_type=popup-ads3.4039.35
Read Me /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-readme3.2931.12
Settings /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-settings3.2929.73
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=popup-ads3.3439.36

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 13 new files
Database: no new tables, 8 new options
New WordPress options
category_children
widget_recent-posts
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
_msbd_popadsm_options
theysaidso_admin_options

Browser metrics Passed 4 tests

Popup Ads Management: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,893 ▲10713.34 ▼1.012.63 ▲0.2243.06 ▼5.63
Dashboard /wp-admin2,264 ▲674.88 ▼0.97105.10 ▼2.9938.08 ▼4.66
Posts /wp-admin/edit.php2,143 ▲432.02 ▲0.0135.43 ▼3.6132.52 ▼3.10
Add New Post /wp-admin/post-new.php1,562 ▲1723.12 ▼0.06636.25 ▼25.6554.47 ▲1.61
Media Library /wp-admin/upload.php1,443 ▲434.17 ▼0.0198.01 ▼5.7144.04 ▼1.15
Add New /wp-admin/post-new.php?post_type=popup-ads2,3887.61174.2265.32
Popup Ads /wp-admin/edit.php?post_type=popup-ads1,1421.9530.0029.43
Read Me /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-readme1,0135.21149.2432.79
Settings /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-settings1,0424.80143.7228.89
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=popup-ads1,4982.2728.5233.39

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts
    • category_children
    • theysaidso_admin_options
    • _msbd_popadsm_options
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
These errors were triggered by the plugin
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-settings
    • > Warning in wp-content/plugins/popup-ads-management/libs/views/admin-view-helper-functions.php+34
    Use of undefined constant MSBD_ADSMP_URL - assumed 'MSBD_ADSMP_URL' (this will throw an Error in a future version of PHP)

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function trailingslashit() in wp-content/plugins/popup-ads-management/main.php:13

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-settings
    • > Network (severe)
    wp-admin/MSBD_ADSMP_URLimages/msbd_logo.png - Failed to load resource: the server responded with a status of 404 (Not Found)
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=popup-ads&page=msbd-popadsm-settings
    • > Other (severe) in unknown
    chrome-error://chromewebdata/ - Refused to display 'https://developers.google.com/' in a frame because it set 'X-Frame-Options' to 'sameorigin'.

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
7 plugin tags: display popup by categories, manage ads, publish popup advertisement, affiliate advertising, display popup by category...

popup-ads-management/main.php 85% from 13 tests

Analyzing the main PHP file in "Popup Ads Management" version 0.0.4
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("popup-ads-management.php" instead of "main.php")
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin757 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5312145600
CSS2140115
JavaScript225442

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity18.50
▷ Minimum class complexity4.00
▷ Maximum class complexity33.00
Average method complexity3.26
▷ Minimum method complexity1.00
▷ Maximum method complexity12.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods31
▷ Static methods722.58%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/msbd_favicon_16.png0.61KB0.63KB0.00%
images/msbd_logo.png28.81KB9.10KB▼ 68.41%
images/msbd_favicon_32.png1.12KB1.20KB0.00%