73% loomisoft-ad-banner-manager

Code Review | Banner Ad Advertising Manager by Loomisoft

WordPress plugin Banner Ad Advertising Manager by Loomisoftscored 73% from 54 tests.

About plugin

  • Plugin page: loomisoft-ad-bann...
  • Plugin version: 2.0.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.0.3
  • WordPress version: 5.9.2
  • First release: Nov 30, 2017
  • Latest release: Feb 21, 2019
  • Number of updates: 11
  • Update frequency: every 40.8 days
  • Top authors: loomisoft (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,450 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.21MB] [CPU: ▼275.38ms] Passed 4 tests

This is a short check of server-side resources used by Banner Ad Advertising Manager by Loomisoft
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.19 ▲1.0773.17 ▲55.02
Dashboard /wp-admin3.84 ▲0.4441.93 ▲5.16
Posts /wp-admin/edit.php3.88 ▲0.2443.39 ▲5.28
Add New Post /wp-admin/post-new.php6.56 ▼0.4193.23 ▼1,166.96
Media Library /wp-admin/upload.php3.85 ▲0.56205.85 ▲179.62
Ad Banners /wp-admin/edit.php?post_type=lsadbanner3.8739.38
Reports /wp-admin/edit.php?post_type=lsadbanner&page=reports_page3.8342.32
Documentation /wp-admin/edit.php?post_type=lsadbanner&page=documentation_page3.8344.17

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 125 new files
Database: 1 new table, 2 new options
New tables
wp_ls_abm_events
New WordPress options
ls_abm_option
widget_ls_abm_banner_widget

Browser metrics Passed 4 tests

Banner Ad Advertising Manager by Loomisoft: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,851 ▲12916.20 ▲0.546.65 ▲1.122.32 ▼0.08
Dashboard /wp-admin2,969 ▲1116.19 ▲0.04123.42 ▼12.66243.87 ▲75.38
Posts /wp-admin/edit.php2,764 ▲793.30 ▲0.0670.98 ▲6.64196.37 ▲52.36
Add New Post /wp-admin/post-new.php1,693 ▼1820.18 ▼0.62432.90 ▼37.02188.19 ▼60.49
Media Library /wp-admin/upload.php1,769 ▲715.62 ▲0.12146.89 ▼0.71310.91 ▲57.82
Ad Banners /wp-admin/edit.php?post_type=lsadbanner1,5393.2665.14185.77
Reports /wp-admin/edit.php?post_type=lsadbanner&page=reports_page1,4743.6396.13201.84
Documentation /wp-admin/edit.php?post_type=lsadbanner&page=documentation_page1,3872.7357.08197.54

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • The plugin did not uninstall successfully, leaving 1 table in the database
    • wp_ls_abm_events
  • This plugin did not uninstall successfully, leaving 2 options in the database
    • ls_abm_option
    • widget_ls_abm_banner_widget

Smoke tests 75% 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/edit.php?post_type=lsadbanner&page=documentation_page
    • > User deprecated in wp-includes/functions.php+5691
    contextual_help is deprecated since version 3.3.0! Use get_current_screen()->add_help_tab(), get_current_screen()->remove_help_tab() instead.

SRP Passed 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Congratulations! This plugin passed the SRP test

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that require attention:
  • Tags: Too many tags (15 tag instead of maximum 10); only the first 5 tags are used in your directory listing
  • Plugin Name: You should set the name of your plugin on the first line ( === Banner Ad Advertising Manager by Loomisoft=== )
Please take inspiration from this readme.txt

loomisoft-ad-banner-manager/loomisoft-ad-banner-manager.php 92% from 13 tests

The primary PHP file in "Banner Ad Advertising Manager by Loomisoft" version 2.0.2 is used by WordPress to initiate all plugin functionality
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 184 characters long)

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin23,983 lines of code in 96 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript393,1583,05313,383
HTML28724272,934
PHP7699802,429
CSS5491592,292
Markdown679002,160
SQL200717
Bourne Shell14034
JSON70028
make1426

PHP code 50% from 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
These items need your attention
  • Cyclomatic complexity of methods has to be reduced to less than 100 (currently 163)
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity171.33
▷ Minimum class complexity13.00
▷ Maximum class complexity359.00
Average method complexity8.20
▷ Minimum method complexity1.00
▷ Maximum method complexity163.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods71
▷ Static methods6794.37%
▷ Public methods71100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.10MB with 0.08MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ls-wp-menu-icon.png19.81KB0.46KB▼ 97.67%
images/ls-wp-mce-icon.png20.80KB0.67KB▼ 96.78%
images/ls-wp-admin-branding.png65.37KB2.53KB▼ 96.13%
js/flot/examples/background.png0.23KB0.33KB0.00%