78% quantcast-choice

Code Review | Quantcast Choice

WordPress plugin Quantcast Choice scored78%from 54 tests.

About plugin

  • Plugin page: quantcast-choice
  • Plugin version: 2.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-6.0.2
  • WordPress version: 6.3.1
  • First release: May 23, 2018
  • Latest release: Oct 7, 2022
  • Number of updates: 31
  • Update frequency: every 51.6 days
  • Top authors: rbaronqc (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

6,000+ active /61,600 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▼3.95ms] Passed 4 tests

Analyzing server-side resources used by Quantcast Choice
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.60 ▲0.1344.56 ▲6.05
Dashboard /wp-admin3.43 ▲0.1346.32 ▼4.68
Posts /wp-admin/edit.php3.55 ▲0.1950.43 ▼2.02
Add New Post /wp-admin/post-new.php6.02 ▲0.1391.43 ▼14.52
Media Library /wp-admin/upload.php3.36 ▲0.1241.19 ▲5.43

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

This is an overview of browser requirements for Quantcast Choice
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲12113.62 ▼0.782.03 ▲0.2841.07 ▼2.50
Dashboard /wp-admin2,229 ▲445.79 ▼0.06102.71 ▼0.3085.06 ▲40.21
Posts /wp-admin/edit.php2,114 ▲221.99 ▼0.0239.90 ▼0.4338.49 ▼0.66
Add New Post /wp-admin/post-new.php1,538 ▲517.58 ▼5.60693.63 ▲96.5049.02 ▼13.08
Media Library /wp-admin/upload.php1,411 ▲234.22 ▼0.0196.78 ▼1.7764.54 ▲22.42

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% 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
  • 2× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/quantcast-choice/public/partials/qc-choice.php
    • > /wp-content/plugins/quantcast-choice/admin/partials/admin-display.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/quantcast-choice/public/class-qc-choice-page.php:163

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 90% 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 to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

quantcast-choice/qc-choice.php 85% from 13 tests

The entry point to "Quantcast Choice" version 2.0.8 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("quantcast-choice.php" instead of "qc-choice.php")
  • Text Domain: Since WordPress version 4.6 the text domain is optional; if specified, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected1,019 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16241697927
JavaScript38472
JSON10018
CSS2012

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.14
Average class complexity4.10
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.77
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods40
▷ Static methods37.50%
▷ Public methods3485.00%
▷ Protected methods00.00%
▷ Private methods615.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
3 PNG files occupy 0.03MB with 0.02MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/img/quantcast-logo.png11.87KB5.92KB▼ 50.12%
admin/img/quantcast-choice-wordmark.png11.01KB5.58KB▼ 49.28%
admin/img/quantcast-icon.png7.24KB2.71KB▼ 62.52%