84% confection

Code Review | Confection WordPress Cable

WordPress plugin Confection WordPress Cable scored84%from 54 tests.

About plugin

  • Plugin page: confection
  • Plugin version: 0.4.7
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.2.2
  • WordPress version: 6.3.1
  • First release: Oct 26, 2020
  • Latest release: Jul 4, 2023
  • Number of updates: 114
  • Update frequency: every 8.6 days
  • Top authors: getconfection (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,711 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.03MB] [CPU: ▲2.67ms] Passed 4 tests

Analyzing server-side resources used by Confection WordPress Cable
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0537.38 ▼2.06
Dashboard /wp-admin3.34 ▲0.0347.19 ▲0.89
Posts /wp-admin/edit.php3.39 ▲0.0349.33 ▲6.19
Add New Post /wp-admin/post-new.php5.92 ▲0.03101.04 ▲6.73
Media Library /wp-admin/upload.php3.26 ▲0.0337.42 ▲5.66

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 18 new files
Database: no new tables, 8 new options
New WordPress options
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
confection_ajax_name
confection_version

Browser metrics Passed 4 tests

An overview of browser requirements for Confection WordPress Cable
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲6613.25 ▼1.195.54 ▲3.5543.11 ▼4.17
Dashboard /wp-admin2,232 ▲475.85 ▲0.76106.54 ▲4.5478.49 ▲32.26
Posts /wp-admin/edit.php2,115 ▲232.00 ▼0.0238.96 ▲2.1135.30 ▲2.68
Add New Post /wp-admin/post-new.php1,688 ▲15522.22 ▼1.14692.54 ▲63.8751.77 ▲5.04
Media Library /wp-admin/upload.php1,405 ▲174.23 ▲0.0593.32 ▼7.2073.71 ▲30.61

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
You still need to fix the following
  • This plugin does not fully uninstall, leaving 7 options in the database
    • confection_ajax_name
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded
    • 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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 28× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/confection/bridge-original.php on line 38
    • > PHP Notice
      Undefined index: value in wp-content/plugins/confection/bridge.php on line 38
    • > PHP Notice
      Undefined index: value in wp-content/plugins/confection/8MQNW7gxjFq3o7Gvis6y.php on line 38
    • > PHP Notice
      Undefined index: value in wp-content/plugins/confection/xUznPeZWAo16BRC7qk88.php on line 38
    • > PHP Notice
      Undefined index: uuid in wp-content/plugins/confection/8MQNW7gxjFq3o7Gvis6y.php on line 38
    • > PHP Notice
      Undefined index: uuid in wp-content/plugins/confection/bridge-original.php on line 38
    • > PHP Notice
      Undefined index: HTTP_USER_AGENT in wp-content/plugins/confection/8MQNW7gxjFq3o7Gvis6y.php on line 10
    • > PHP Notice
      Undefined index: name in wp-content/plugins/confection/xUznPeZWAo16BRC7qk88.php on line 38
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/confection/inc/community.php:5
    • > PHP Notice
      Undefined index: uuid in wp-content/plugins/confection/bridge.php on line 38

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 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
3 plugin tags: data, privacy, cookie

confection/confection-wp-plugin.php 85% from 13 tests

"Confection WordPress Cable" version 0.4.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
It is important to fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("confection.php" instead of "confection-wp-plugin.php")
  • Description: Please don't use more than 140 characters for the plugin description (currently 188 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin987 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP826962814
PO File17076148
Markdown116023
JavaScript1001
SVG1001

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity51.00
▷ Minimum class complexity51.00
▷ Maximum class complexity51.00
Average method complexity9.33
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions20
▷ Named functions1155.00%
▷ Anonymous functions945.00%
Constants3
▷ Global constants3100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected