84% critique

Code Review | Critique

WordPress plugin Critique scored84%from 54 tests.

About plugin

  • Plugin page: critique
  • Plugin version: 1.3.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-4.6
  • WordPress version: 6.3.1
  • First release: Apr 5, 2014
  • Latest release: Nov 23, 2017
  • Number of updates: 17
  • Update frequency: every 100.6 days
  • Top authors: Phillip.Gooch (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,319 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▼0.10MB] [CPU: ▼8.06ms] Passed 4 tests

An overview of server-side resources used by Critique
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.04 ▼0.65
Dashboard /wp-admin3.32 ▲0.0246.65 ▲0.33
Posts /wp-admin/edit.php3.37 ▲0.0148.23 ▼0.92
Add New Post /wp-admin/post-new.php5.46 ▼0.4369.99 ▼31.00
Media Library /wp-admin/upload.php3.24 ▲0.0132.98 ▲0.85

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 50 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
db_upgraded
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

Checking browser requirements for Critique
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,822 ▲7613.29 ▼1.091.67 ▼0.0943.85 ▼2.02
Dashboard /wp-admin2,227 ▲364.88 ▲0.01102.45 ▼0.7936.25 ▼6.16
Posts /wp-admin/edit.php2,104 ▲122.04 ▲0.0036.32 ▼3.9032.28 ▼4.23
Add New Post /wp-admin/post-new.php6,234 ▲4,70126.01 ▲2.93875.87 ▲288.0160.98 ▲16.33
Media Library /wp-admin/upload.php1,400 ▲124.21 ▼0.0199.07 ▲5.0144.00 ▲0.79

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

SRP 50% 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 take a closer look at the following
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/critique/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/critique/trunk/critique.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/critique/critique.php:32
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/critique/trunk/settings.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The Critique settings page.), #2 (The 5-Star Metabox.), #3 (The 5-Star Display.), #4 (The #/100 Metabox.), #5 (The Default #/100 display.)
The official readme.txt is a good inspiration

critique/critique.php Passed 13 tests

The entry point to "Critique" version 1.3.4 is a PHP file that has certain tags in its header comment area
72 characters long description:
Critique is a simple review platform with the power to do what you need.

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
Success! There were no dangerous files found in this plugin1,072 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP22364443
HTML126263
CSS82850260
JavaScript111164
JSON10028
SVG10014

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
Average class complexity68.00
▷ Minimum class complexity68.00
▷ Maximum class complexity68.00
Average method complexity6.58
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods24
▷ Static methods00.00%
▷ Public methods24100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
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
10 compressed PNG files occupy 1.34MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/screenshot-3.png101.46KB97.75KB▼ 3.65%
trunk/screenshot-5.png127.56KB125.95KB▼ 1.26%
trunk/screenshot-1.png116.81KB113.96KB▼ 2.44%
trunk/screenshot-4.png180.71KB180.20KB0.28%
screenshot-4.png180.71KB180.20KB0.28%