72% advertising-management

Code Review | Wp advertising management

WordPress plugin Wp advertising management scored72%from 54 tests.

About plugin

  • Plugin page: advertising-manag...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Feb 20, 2019
  • Latest release: Sep 12, 2019
  • Number of updates: 10
  • Update frequency: every 20.5 days
  • Top authors: simonemarconbdg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /721 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼13.22ms] Passed 4 tests

Analyzing server-side resources used by Wp advertising management
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.79 ▲0.3335.42 ▲0.57
Dashboard /wp-admin3.69 ▲0.3951.78 ▲0.09
Posts /wp-admin/edit.php3.79 ▲0.4347.07 ▲3.23
Add New Post /wp-admin/post-new.php4.94 ▼0.9542.74 ▼56.78
Media Library /wp-admin/upload.php3.63 ▲0.4043.08 ▲11.58
Clienti /wp-admin/admin.php?page=option_adv_management_customer3.5633.36
Vendite /wp-admin/admin.php?page=option_adv_management_sales3.5645.26
Premium /wp-admin/admin.php?page=option_adv_management_premium3.5631.98
Impostazioni /wp-admin/admin.php?page=option_adv_management_support3.5635.05
ADV management /wp-admin/admin.php?page=option_adv_management3.5636.29
Articoli /wp-admin/admin.php?page=option_adv_management_advertising3.5335.25

Server storage [IO: ▲0.12MB] [DB: ▲0.01MB] Passed 3 tests

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 30 new files
Database: 4 new tables, 10 new options
New tables
wp_adv_advertising
wp_adv_paypal
wp_adv_sales
wp_adv_customers
New WordPress options
widget_recent-posts
db_adv_sales
db_upgraded
widget_theysaidso_widget
db_adv_advertising
db_adv_paypal
widget_recent-comments
db_adv_customers
theysaidso_admin_options
can_compress_scripts

Browser metrics Passed 4 tests

An overview of browser requirements for Wp advertising management
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,079 ▲31813.88 ▼0.3415.67 ▲13.9545.53 ▲1.31
Dashboard /wp-admin2,230 ▲535.55 ▲0.01101.68 ▼8.0377.43 ▲35.40
Posts /wp-admin/edit.php2,153 ▲501.97 ▼0.0136.82 ▼6.8730.27 ▼5.34
Add New Post /wp-admin/post-new.php1,440 ▼9522.69 ▲4.58531.43 ▼98.92155.69 ▲97.06
Media Library /wp-admin/upload.php1,450 ▲504.19 ▼0.0294.26 ▼2.1175.41 ▲35.94
Clienti /wp-admin/admin.php?page=option_adv_management_customer9732.1925.7329.76
Vendite /wp-admin/admin.php?page=option_adv_management_sales9412.1924.6824.63
Premium /wp-admin/admin.php?page=option_adv_management_premium1,1383.3540.1355.45
Impostazioni /wp-admin/admin.php?page=option_adv_management_support1,0993.1133.8437.92
ADV management /wp-admin/admin.php?page=option_adv_management1,0003.2732.1534.91
Articoli /wp-admin/admin.php?page=option_adv_management_advertising1,0932.0322.5226.09

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=option_adv_management_advertising
    • > Notice in wp-content/plugins/advertising-management/admin/class/advertising_view_class.php+76
    Undefined index: action

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 output text when accessed directly:
    • > /wp-content/plugins/advertising-management/wp_advertising_managment.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please take a look at the following user-side issues
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=option_adv_management_advertising
    • > Network (severe)
    wp-content/plugins/wp_advertising_management/template/images/wp_advertising_menu_icon.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/admin.php?page=option_adv_management_premium
    • > Network (severe)
    https://wpadvertisingmanagement.com/wp-content/uploads/2019/02/Logo_COMPACT.png - Failed to load resource: net::ERR_NAME_NOT_RESOLVED

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
These attributes need your attention:
  • Requires at least: Invalid version format
The official readme.txt is a good inspiration

advertising-management/wp_advertising_managment.php 85% from 13 tests

The main PHP file in "Wp advertising management" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
It is important to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("advertising-management.php" instead of "wp_advertising_managment.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 176 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin2,252 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
PHP258006552,192
CSS210060

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.28
Average class complexity15.33
▷ Minimum class complexity8.00
▷ Maximum class complexity23.00
Average method complexity2.39
▷ Minimum method complexity1.00
▷ Maximum method complexity14.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods31
▷ Static methods00.00%
▷ Public methods31100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions40
▷ Named functions40100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
2 compressed PNG files occupy 0.00MB
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
template/images/icons8-stella-10.png0.28KB0.29KB0.00%
template/images/wp_advertising_menu_icon.png0.35KB0.43KB0.00%