68% corner-ad

Code Review | Corner Ad

WordPress plugin Corner Ad scored 68% from 54 tests.

About plugin

  • Plugin page: corner-ad
  • Plugin version: 1.0.61
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.5-6.3
  • WordPress version: 6.3.1
  • First release: Mar 24, 2013
  • Latest release: Jul 23, 2023
  • Number of updates: 110
  • Update frequency: every 34.3 days
  • Top authors: codepeople (100%)

Code review

54 tests

User reviews

30 reviews

Install metrics

700+ active / 70,418 total downloads

Benchmarks

Plugin footprint 65% 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.25MB] [CPU: ▼3.90ms] Passed 4 tests

Server-side resources used by Corner Ad
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.72 ▲0.2638.15 ▼1.81
Dashboard /wp-admin3.56 ▲0.2548.49 ▼0.61
Posts /wp-admin/edit.php3.67 ▲0.3145.17 ▼3.30
Add New Post /wp-admin/post-new.php6.14 ▲0.2586.27 ▼9.88
Media Library /wp-admin/upload.php3.48 ▲0.2537.04 ▲0.15

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 26 new files
Database: 2 new tables, 8 new options
New tables
wp_corner_ad_img
wp_corner_ad
New WordPress options
installed_corner-ad
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
CORNER_AD_PLUGIN_VERSION
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Corner Ad
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.61 ▼0.654.14 ▲1.9839.33 ▼10.75
Dashboard /wp-admin2,210 ▲255.90 ▼0.11103.18 ▼5.5040.33 ▲0.48
Posts /wp-admin/edit.php2,093 ▲42.05 ▲0.0236.36 ▼1.3932.76 ▲0.03
Add New Post /wp-admin/post-new.php6,440 ▲4,90623.53 ▲0.27846.66 ▲163.6468.67 ▲13.31
Media Library /wp-admin/upload.php1,386 ▲14.16 ▼0.0296.75 ▼12.8542.08 ▼7.44
Corner AD /wp-admin/corner-ad.php260.440.0813.65

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • Zombie tables detected upon uninstall: 2 tables
    • wp_corner_ad_img
    • wp_corner_ad
  • Zombie WordPress options detected upon uninstall: 8 options
    • db_upgraded
    • can_compress_scripts
    • installed_corner-ad
    • theysaidso_admin_options
    • CORNER_AD_PLUGIN_VERSION
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments

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
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'SiteOrigin_Widget' not found in wp-content/plugins/corner-ad/pagebuilders/siteorigin/siteorigin-cpca/siteorigin-cpca.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/corner-ad/pagebuilders/beaverbuilder/cornerad/cornerad.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'FLBuilderModule' not found in wp-content/plugins/corner-ad/pagebuilders/beaverbuilder/cornerad/cornerad.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corner-ad/banner.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/corner-ad/banner.php:105

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/corner-ad.php
    • > Network (severe)
    wp-admin/corner-ad.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 93% 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
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 19 tag instead of maximum 10
Please take inspiration from this readme.txt

corner-ad/corner-ad.php 92% from 13 tests

The principal PHP file in "Corner Ad" v. 1.0.61 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 227 characters long)

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
Success! There were no dangerous files found in this plugin2,325 lines of code in 23 files:
LanguageFilesBlank linesComment linesLines of code
PHP131881101,300
JavaScript68163600
PO File199105237
HTML110180
CSS1007
SVG1001

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.64
Average class complexity5.20
▷ Minimum class complexity1.00
▷ Maximum class complexity11.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods27.41%
▷ Private methods311.11%
Functions21
▷ Named functions1990.48%
▷ Anonymous functions29.52%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
There were not PNG files found in your plugin