78% smartarget-corner-ribbon

Code Review | Smartarget Corner Ribbon

WordPress plugin Smartarget Corner Ribbon scored78%from 54 tests.

About plugin

  • Plugin page: smartarget-corner...
  • Plugin version: 1.2
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.3
  • WordPress version: 6.3.1
  • First release: Aug 26, 2021
  • Latest release: Aug 9, 2023
  • Number of updates: 10
  • Update frequency: every 71.3 days
  • Top authors: erezs (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /875 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.07MB] [CPU: ▼3.84ms] Passed 4 tests

A check of server-side resources used by Smartarget Corner Ribbon
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0735.98 ▼6.10
Dashboard /wp-admin3.37 ▲0.0651.80 ▲5.28
Posts /wp-admin/edit.php3.49 ▲0.1349.21 ▲2.50
Add New Post /wp-admin/post-new.php5.97 ▲0.0881.43 ▼16.04
Media Library /wp-admin/upload.php3.30 ▲0.0640.48 ▲4.27
Smartarget Corner Ribbon /wp-admin/options-general.php?page=smartarget_corner_ribbon3.2630.81

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 24 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for Smartarget Corner Ribbon
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,921 ▲16021.14 ▲6.758.91 ▲7.3745.32 ▲4.64
Dashboard /wp-admin2,202 ▲2510.66 ▲5.00157.77 ▲71.6537.20 ▼4.35
Posts /wp-admin/edit.php2,116 ▲197.23 ▲5.28115.96 ▲81.9137.29 ▼0.86
Add New Post /wp-admin/post-new.php1,695 ▲16927.62 ▲4.60734.78 ▲72.3951.91 ▲4.83
Media Library /wp-admin/upload.php1,407 ▲79.51 ▲5.35175.11 ▲80.9144.67 ▲2.23
Smartarget Corner Ribbon /wp-admin/options-general.php?page=smartarget_corner_ribbon1,3078.81138.7875.65

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

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
The following issues need your attention
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/smartarget-corner-ribbon/public/partials/smartarget-corner-ribbon-public-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_home_url() in wp-content/plugins/smartarget-corner-ribbon/admin/partials/smartarget-corner-ribbon-admin-display.php:20

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
7 plugin tags: corner, promotion, prompte, corner ribbon, ribbon...

smartarget-corner-ribbon/smartarget-corner-ribbon.php 92% from 13 tests

This is the main PHP file of "Smartarget Corner Ribbon" version 1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Text Domain: The text domain must be the same as the plugin slug, although optional since WordPress version 4.6

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
No dangerous file extensions were detected430 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP12130522225
JavaScript351,397205
CSS1040

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.10
Average class complexity2.00
▷ Minimum class complexity1.00
▷ Maximum class complexity5.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods28
▷ Static methods27.14%
▷ Public methods2382.14%
▷ Protected methods00.00%
▷ Private methods517.86%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
PNG images were not found in this plugin