68% cackle

Code Review | Cackle

WordPress plugin Cackle scored 68% from 54 tests.

About plugin

  • Plugin page: cackle
  • Plugin version: 4.33
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9.1-5.6.1
  • WordPress version: 6.3.1
  • First release: Jan 23, 2012
  • Latest release: Feb 9, 2021
  • Number of updates: 172
  • Update frequency: every 19.2 days
  • Top authors: cackle (94.77%)boroV (5.81%)

Code review

54 tests

User reviews

26 reviews

Install metrics

700+ active / 76,215 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.02MB] [CPU: ▼3.41ms] Passed 4 tests

Analyzing server-side resources used by Cackle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0835.85 ▼6.19
Dashboard /wp-admin3.32 ▲0.0245.96 ▼1.39
Posts /wp-admin/edit.php3.37 ▲0.0246.85 ▲0.41
Add New Post /wp-admin/post-new.php5.90 ▲0.0283.71 ▼6.45
Media Library /wp-admin/upload.php3.24 ▲0.0234.68 ▲3.97
Cackle moderate /wp-admin/edit-comments.php?page=cackle3.2332.48
Cackle settings /wp-admin/edit-comments.php?page=cackle_settings3.2232.71

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 21 new files
Database: 1 new table, 7 new options
New tables
wp_cackle_channel
New WordPress options
cackle_plugin_version
widget_recent-posts
db_upgraded
theysaidso_admin_options
widget_theysaidso_widget
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Cackle
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,851 ▲11613.63 ▼0.7814.69 ▲12.8140.59 ▼32.00
Dashboard /wp-admin2,219 ▲315.81 ▼0.0497.90 ▼19.6638.98 ▼3.06
Posts /wp-admin/edit.php2,108 ▲192.02 ▲0.0435.53 ▼2.1029.27 ▼3.92
Add New Post /wp-admin/post-new.php1,556 ▲2018.16 ▼4.84629.10 ▼56.0555.17 ▲2.16
Media Library /wp-admin/upload.php1,398 ▲134.16 ▼0.0694.10 ▼3.8542.38 ▲2.31
Cackle moderate /wp-admin/edit-comments.php?page=cackle2,6834.81132.1866.19
Cackle settings /wp-admin/edit-comments.php?page=cackle_settings2,0453.83131.3048.72

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
You still need to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_cackle_channel
  • Zombie WordPress options were found after uninstall: 7 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-posts
    • cackle_plugin_version
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments

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

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 take a closer look at the following
  • 6× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cackle/manage.php:1
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/cackle/comment-template.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/cackle/cackle_admin.php:66
    • > PHP Notice
      Trying to get property 'ID' of non-object in wp-content/plugins/cackle/comment-template.php on line 6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cackle/cackle_activate.php:52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/cackle/cackle_api.php:12

User-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Please fix the following browser errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=cackle_settings
    • > Console-api (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js 101:326 "ARIA: Attribute \"" "aria-label" "\", required for accessibility, is missing on node:" md-switch.md-primary.ng-pristine.ng-untouched.ng-valid.md-default-theme
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/edit-comments.php?page=cackle_settings
    • > Console-api (warning) in unknown
    https://ajax.googleapis.com/ajax/libs/angularjs/1.3.15/angular.min.js 101:326 "ARIA: Attribute \"" "aria-label" "\", required for accessibility, is missing on node:" md-switch.md-primary.ng-pristine.ng-untouched.ng-valid.md-default-theme.md-checked

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
Attributes that require attention:
  • Plugin Name: "Plugin Name" should be replaced with the name of your plugin on the first line ( === cackle === )
  • Screenshots: Please add images for these screenshots: #1 (Cackle widget preview (English)), #2 (Cackle widget preview (Русский)), #3 (Steps for getting API keys in red), #4 (API keys highlighted in red), #5 (Administration panel)
You can take inspiration from this readme.txt

cackle/cackle.php 92% from 13 tests

This is the main PHP file of "Cackle" version 4.33, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/locales")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected1,814 lines of code in 16 files:
LanguageFilesBlank linesComment linesLines of code
PHP132411781,674
PO File1551105
CSS14034
JavaScript1011

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity15.50
▷ Minimum class complexity2.00
▷ Maximum class complexity43.00
Average method complexity4.14
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods37
▷ Static methods513.51%
▷ Public methods37100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png29.30KB12.82KB▼ 56.26%
screenshot-2.png43.25KB17.73KB▼ 59.02%
screenshot-3.png16.71KB10.14KB▼ 39.32%