74% sponsorship-disclaimer

Code Review | Sponsorship Disclaimer

WordPress plugin Sponsorship Disclaimer scored74%from 54 tests.

About plugin

  • Plugin page: sponsorship-discl...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 6.3.1
  • First release: Dec 19, 2015
  • Latest release: Dec 19, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: aeryn_lynne (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /871 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
This plugin's installer ran successfully

Server metrics [RAM: ▼1.96MB] [CPU: ▼58.82ms] Passed 4 tests

Server-side resources used by Sponsorship Disclaimer
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.444.26 ▼38.91
Dashboard /wp-admin2.05 ▼1.265.69 ▼45.77
Posts /wp-admin/edit.php2.05 ▼1.315.55 ▼49.95
Add New Post /wp-admin/post-new.php2.05 ▼3.845.21 ▼100.65
Media Library /wp-admin/upload.php2.05 ▼1.184.85 ▼32.33

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
widget_recent-comments
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for Sponsorship Disclaimer
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,843 ▲9713.35 ▼1.292.21 ▲0.6342.64 ▲2.54
Dashboard /wp-admin2,217 ▲294.86 ▼1.01100.26 ▼7.7144.44 ▼1.28
Posts /wp-admin/edit.php2,097 ▲81.99 ▼0.0740.00 ▼0.4338.47 ▲1.41
Add New Post /wp-admin/post-new.php1,545 ▲2618.51 ▼4.55671.31 ▲60.6748.06 ▼6.37
Media Library /wp-admin/upload.php1,396 ▲84.19 ▼0.0499.18 ▼5.2644.14 ▼3.30

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
These items require your attention
  • Uninstall procedure validation failed for this plugin
    • > User notice in wp-includes/functions.php+5905
    Function wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or login_enqueue_scripts hooks. This notice was triggered by the sponbutton-js handle. Please see Debugging in WordPress for more information. (This message was added in version 3.3.0.)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/sponsorship-disclaimer/spon-disclaim-shortcode.php:16

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
4 plugin tags: shortcode, disclaimer, blogger, sponsor

sponsorship-disclaimer/spon-disclaim-shortcode.php 85% from 13 tests

The principal PHP file in "Sponsorship Disclaimer" v. 1.0.0 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: Please don't use more than 140 characters for the plugin description (currently 286 characters long)
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("sponsorship-disclaimer.php" instead of "spon-disclaim-shortcode.php")

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
There were no executable files found in this plugin58 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1111631
JavaScript17327

PHP code Passed 2 tests

Analyzing 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.08
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
js/spnsr.png0.42KB0.28KB▼ 35.17%