72% podamibe-advertisement-management

Code Review | Podamibe Advertisement Management

WordPress plugin Podamibe Advertisement Management scored72%from 54 tests.

About plugin

  • Plugin page: podamibe-advertis...
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.0
  • WordPress version: 6.3.1
  • First release: Nov 11, 2016
  • Latest release: May 22, 2019
  • Number of updates: 9
  • Update frequency: every 102.0 days
  • Top authors: podamibe (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

60+ active /5,398 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
Install script ran successfully

Server metrics [RAM: ▲0.29MB] [CPU: ▲0.40ms] Passed 4 tests

Analyzing server-side resources used by Podamibe Advertisement Management
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.73 ▲0.2639.31 ▼1.91
Dashboard /wp-admin3.60 ▲0.2950.81 ▼6.65
Posts /wp-admin/edit.php3.72 ▲0.3551.46 ▲2.46
Add New Post /wp-admin/post-new.php6.21 ▲0.3293.33 ▲7.72
Media Library /wp-admin/upload.php3.52 ▲0.2943.06 ▲9.68
Settings /wp-admin/edit.php?post_type=pads-mgmt&page=ads-mgmt-settings3.4734.09
Add New /wp-admin/post-new.php?post_type=pads-mgmt3.6552.30
All Advertise /wp-admin/edit.php?post_type=pads-mgmt3.5740.15
Categories /wp-admin/edit-tags.php?taxonomy=padscat&post_type=pads-mgmt3.5236.73

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

Analyzing filesystem and database footprints of this plugin
This plugin installed successfully
Filesystem: 33 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Checking browser requirements for Podamibe Advertisement Management
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,979 ▲21814.25 ▼0.287.54 ▲5.8843.94 ▼4.00
Dashboard /wp-admin2,253 ▲765.36 ▼0.2597.32 ▼9.7169.46 ▲23.76
Posts /wp-admin/edit.php2,173 ▲762.43 ▲0.3552.15 ▲14.5438.16 ▲1.71
Add New Post /wp-admin/post-new.php1,591 ▲5823.11 ▼0.17673.24 ▼19.8835.87 ▼25.54
Media Library /wp-admin/upload.php1,469 ▲724.87 ▲0.65100.42 ▼0.3877.32 ▲33.68
Settings /wp-admin/edit.php?post_type=pads-mgmt&page=ads-mgmt-settings1,7123.1059.2631.06
Add New /wp-admin/post-new.php?post_type=pads-mgmt2,5947.92206.53118.49
All Advertise /wp-admin/edit.php?post_type=pads-mgmt1,1522.3140.1931.00
Categories /wp-admin/edit-tags.php?taxonomy=padscat&post_type=pads-mgmt1,3502.2036.6931.39

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_theysaidso_widget

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
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=pads-mgmt&page=ads-mgmt-settings
    • > Warning in wp-content/plugins/podamibe-advertisement-management/inc/backend/includes/class-pam-main-page.php+55
    Use of undefined constant SFWA_TEXT_DOMAIN - assumed 'SFWA_TEXT_DOMAIN' (this will throw an Error in a future version of PHP)

SRP 0% 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
  • 3× PHP files output text when accessed directly:
    • > /wp-content/plugins/podamibe-advertisement-management/advertisement-management.php
    • > /wp-content/plugins/podamibe-advertisement-management/inc/backend/class-pam-how-to-use.php
    • > /wp-content/plugins/podamibe-advertisement-management/inc/backend/activation.php
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/podamibe-advertisement-management/inc/frontend/dynamic-style.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/podamibe-advertisement-management/inc/backend/includes/padm-widget.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Tags: Please reduce the number of tags, currently 12 tag instead of maximum 10
You can take inspiration from this readme.txt

podamibe-advertisement-management/advertisement-management.php 85% from 13 tests

The main PHP script in "Podamibe Advertisement Management" version 1.0.4 is automatically included on every request by WordPress
Please take the time 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
  • Main file name: Name the main plugin file the same as the plugin slug ("podamibe-advertisement-management.php" instead of "advertisement-management.php")

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
Success! There were no dangerous files found in this plugin7,078 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript61,1263354,815
PHP121892571,237
CSS5118451,013
SVG11013

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity24.43
▷ Minimum class complexity1.00
▷ Maximum class complexity47.00
Average method complexity6.47
▷ Minimum method complexity1.00
▷ Maximum method complexity40.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods30
▷ Static methods00.00%
▷ Public methods2996.67%
▷ Protected methods00.00%
▷ Private methods13.33%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants11
▷ Global constants11100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
3 PNG files occupy 0.06MB with 0.05MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pam-icons.png21.20KB1.13KB▼ 94.67%
images/logo_ads.png19.68KB8.07KB▼ 58.96%
images/pam-set-icons.png21.85KB1.43KB▼ 93.47%