78% eventsads-banner

Code Review | Events Ads Banner

WordPress plugin Events Ads Banner scored78%from 54 tests.

About plugin

  • Plugin page: eventsads-banner
  • Plugin version: 2.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.1-4.4.2
  • WordPress version: 6.3.1
  • First release: Mar 12, 2015
  • Latest release: Jun 13, 2017
  • Number of updates: 221
  • Update frequency: every 3.8 days
  • Top authors: fabiettos (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

10+ active /10,481 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
Installer ran successfully

Server metrics [RAM: ▲0.16MB] [CPU: ▼8.54ms] Passed 4 tests

This is a short check of server-side resources used by Events Ads Banner
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1239.23 ▼2.94
Dashboard /wp-admin3.49 ▲0.1448.22 ▼11.09
Posts /wp-admin/edit.php3.60 ▲0.2449.51 ▼4.71
Add New Post /wp-admin/post-new.php6.07 ▲0.1893.65 ▼15.42
Media Library /wp-admin/upload.php3.41 ▲0.1839.79 ▲1.42
Banner Issues /wp-admin/admin.php?page=evadban-adm-problems3.3832.29
Add Banner /wp-admin/admin.php?page=evadban-adm-add3.5134.73
Events/ADS Banner /wp-admin/admin.php?page=evadban-adm-home3.4633.34
Banner Settings /wp-admin/admin.php?page=evadban-adm-settings3.5431.96

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 34 new files
Database: no new tables, 10 new options
New WordPress options
fmt_evadban_plugin_attivo
db_upgraded
widget_recent-comments
fmt_evadban_versione
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
can_compress_scripts
fmt_evadban_data_installazione
fmt_evadban_data_attivazione

Browser metrics Passed 4 tests

Events Ads Banner: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,944 ▲19813.68 ▼1.079.39 ▲7.6439.01 ▲0.63
Dashboard /wp-admin2,241 ▲564.84 ▼1.03103.60 ▼2.8138.82 ▼1.60
Posts /wp-admin/edit.php2,127 ▲351.97 ▼0.0440.29 ▼7.5334.83 ▼8.14
Add New Post /wp-admin/post-new.php1,561 ▲3323.06 ▲4.91644.24 ▲15.0056.16 ▲5.03
Media Library /wp-admin/upload.php1,423 ▲414.22 ▲0.03112.12 ▲2.0547.68 ▲5.86
Banner Issues /wp-admin/admin.php?page=evadban-adm-problems7792.0323.2422.16
Add Banner /wp-admin/admin.php?page=evadban-adm-add1,6522.2043.6760.99
Events/ADS Banner /wp-admin/admin.php?page=evadban-adm-home9942.2047.0455.73
Banner Settings /wp-admin/admin.php?page=evadban-adm-settings1,5271.9530.1844.10

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

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

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/eventsads-banner/eventsads-banner.php
    • > /wp-content/plugins/eventsads-banner/index.php
  • 12× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Cannot access parent:: when no class scope is active in wp-content/plugins/eventsads-banner/admin/add_view.php:15
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/eventsads-banner/view/banner.php:2
    • > PHP Warning
      require_once(ABSPATHwp-admin/includes/upgrade.php): failed to open stream: No such file or directory in wp-content/plugins/eventsads-banner/uninstall.php on line 2
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/eventsads-banner/admin/home_view.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'EvAdBanner_Admin' not found in wp-content/plugins/eventsads-banner/admin/problems_class.php:4
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/eventsads-banner/uninstall.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'EvAdBanner_Admin' not found in wp-content/plugins/eventsads-banner/admin/settings_class.php:2
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/upgrade.php' (include_path='.:/usr/share/php') in wp-content/plugins/eventsads-banner/uninstall.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'EvAdBanner_Admin' not found in wp-content/plugins/eventsads-banner/admin/home_class.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'EvAdBanner_Admin' not found in wp-content/plugins/eventsads-banner/admin/add_class.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === eventsads-banner === )
You can look at the official readme.txt

eventsads-banner/eventsads-banner.php Passed 13 tests

"Events Ads Banner" version 2.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
117 characters long description:
A simple banner to show advertising, comunications, events and more. Very simple to use and to customize ! Try it !!!

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin2,736 lines of code in 26 files:
LanguageFilesBlank linesComment linesLines of code
PHP151972691,817
CSS5142301382
JavaScript53424269
PO File1292594268

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity18.12
▷ Minimum class complexity1.00
▷ Maximum class complexity49.00
Average method complexity3.36
▷ Minimum method complexity1.00
▷ Maximum method complexity25.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods58
▷ Static methods1525.86%
▷ Public methods3967.24%
▷ Protected methods23.45%
▷ Private methods1729.31%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants19
▷ Global constants19100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
3 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/freccia_sx.png3.06KB2.05KB▼ 33.05%
img/up.png2.08KB0.95KB▼ 54.38%
img/freccia_dx.png3.07KB2.05KB▼ 33.41%