78% ctr-widget

Code Review | CTR Widget

WordPress plugin CTR Widget scored78%from 54 tests.

About plugin

  • Plugin page: ctr-widget
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.5.1
  • WordPress version: 6.3.1
  • First release: Mar 25, 2013
  • Latest release: Mar 25, 2013
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: JonHaver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,476 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.30MB] [CPU: ▼12.65ms] Passed 4 tests

An overview of server-side resources used by CTR Widget
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.08 ▼1.385.30 ▼38.16
Dashboard /wp-admin3.36 ▲0.0648.69 ▲0.34
Posts /wp-admin/edit.php3.47 ▲0.1249.38 ▲2.78
Add New Post /wp-admin/post-new.php5.94 ▲0.0584.65 ▼15.57
Media Library /wp-admin/upload.php3.28 ▲0.0540.19 ▲3.54

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 9 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by CTR Widget
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,913 ▲17814.13 ▼0.466.25 ▲4.2540.43 ▼7.50
Dashboard /wp-admin2,213 ▲254.88 ▼0.0599.60 ▼9.8040.21 ▼1.33
Posts /wp-admin/edit.php2,093 ▲12.04 ▲0.0540.54 ▲3.2034.13 ▼1.52
Add New Post /wp-admin/post-new.php1,537 ▲423.24 ▼0.43664.64 ▼30.1662.72 ▲0.61
Media Library /wp-admin/upload.php1,392 ▲44.20 ▼0.1095.36 ▼19.4342.86 ▼3.42
CTR Widget /wp-admin/ctr-widget.php260.440.0814.92

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts

Smoke tests 50% 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 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 5× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/ctr-widget/views/admin.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/ctr-widget/classes/widget.php:78
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ctr-widget/classes/admin.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ctr-widget/ctr-widget.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/ctr-widget/tests/AdminTest.php:5

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/ctr-widget.php
    • > Network (severe)
    wp-admin/ctr-widget.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: Screenshot #1 (2.) image missing
The official readme.txt is a good inspiration

ctr-widget/ctr-widget.php Passed 13 tests

This is the main PHP file of "CTR Widget" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
101 characters long description:
Adds a "cloud box", "floating widget" "scrolling widget" to a website with an easy to edit html area.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin295 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP54549259
JavaScript10024
XML10012

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.12
Average class complexity3.60
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.59
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes5
▷ Abstract classes00.00%
▷ Concrete classes5100.00%
▷ Final classes00.00%
Methods22
▷ Static methods00.00%
▷ Public methods2195.45%
▷ Protected methods00.00%
▷ Private methods14.55%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected