84% cpo-widgets

Code Review | CPO Widgets

WordPress plugin CPO Widgets scored84%from 54 tests.

About plugin

  • Plugin page: cpo-widgets
  • Plugin version: 1.1.0
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-5.5
  • WordPress version: 6.3.1
  • First release: Mar 3, 2014
  • Latest release: Nov 5, 2020
  • Number of updates: 14
  • Update frequency: every 174.3 days
  • Top authors: cpothemes (57.14%)machothemes (42.86%)wpchill (14.29%)

Code review

54 tests

User reviews

2 reviews

Install metrics

4,000+ active /69,856 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.20MB] [CPU: ▲0.83ms] Passed 4 tests

Analyzing server-side resources used by CPO Widgets
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2244.17 ▲0.60
Dashboard /wp-admin3.49 ▲0.1952.45 ▼0.91
Posts /wp-admin/edit.php3.61 ▲0.2555.24 ▲5.05
Add New Post /wp-admin/post-new.php6.08 ▲0.19101.45 ▲0.58
Media Library /wp-admin/upload.php3.42 ▲0.1942.19 ▲3.05

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 12 new options
New WordPress options
theysaidso_admin_options
widget_ctwg-twitter-stream
widget_ctwg-author
widget_ctwg-flickr
widget_recent-comments
widget_ctwg-social
db_upgraded
widget_theysaidso_widget
widget_ctwg-recent-posts
widget_recent-posts
...

Browser metrics Passed 4 tests

Checking browser requirements for CPO Widgets
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.23 ▼0.031.73 ▼0.0140.82 ▼5.19
Dashboard /wp-admin2,195 ▲185.68 ▲0.0891.86 ▼1.8040.32 ▼2.73
Posts /wp-admin/edit.php2,100 ▼01.99 ▲0.0339.45 ▼6.0135.72 ▲1.14
Add New Post /wp-admin/post-new.php1,526 ▼223.04 ▼0.08674.35 ▲15.1959.26 ▲7.05
Media Library /wp-admin/upload.php1,397 ▼64.12 ▼0.0697.75 ▼9.8840.92 ▼6.94

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 12 options in the database
    • widget_ctwg-flickr
    • widget_ctwg-social
    • db_upgraded
    • widget_ctwg-twitter-stream
    • widget_ctwg-author
    • widget_ctwg-advert
    • can_compress_scripts
    • widget_recent-posts
    • widget_ctwg-recent-posts
    • theysaidso_admin_options
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 7× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-recent.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/cpo-widgets/cpo-widgets.php:37
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-tweets.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-flickr.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-social.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-author.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/cpo-widgets/widgets/widget-advert.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
8 plugin tags: banner, sidebar, author, widget, recent...

cpo-widgets/cpo-widgets.php 92% from 13 tests

The main file in "CPO Widgets" v. 1.1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 250 characters long)

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
There were no executable files found in this plugin1,334 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP92193461,248
CSS1151364
SVG10022

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity9.17
▷ Minimum class complexity1.00
▷ Maximum class complexity29.00
Average method complexity2.52
▷ Minimum method complexity1.00
▷ Maximum method complexity23.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes18
▷ Abstract classes211.11%
▷ Concrete classes1688.89%
▷ Final classes00.00%
Methods101
▷ Static methods109.90%
▷ Public methods9089.11%
▷ Protected methods21.98%
▷ Private methods98.91%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
No PNG images were found in this plugin