78% classy

Code Review | Classy

WordPress plugin Classy scored78%from 54 tests.

About plugin

  • Plugin page: classy
  • Plugin version: 1.2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-4.2.3
  • WordPress version: 6.3.1
  • First release: Mar 6, 2015
  • Latest release: Aug 13, 2015
  • Number of updates: 35
  • Update frequency: every 4.5 days
  • Top authors: Asitha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,642 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.09MB] [CPU: ▼4.14ms] Passed 4 tests

An overview of server-side resources used by Classy
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /38.74 ▲0.017,244,260.10 ▲8,558.00
Dashboard /wp-admin3.48 ▲0.0954.89 ▼9.57
Posts /wp-admin/edit.php3.59 ▲0.1951.73 ▼0.72
Add New Post /wp-admin/post-new.php6.08 ▲0.15104.68 ▼7.50
Media Library /wp-admin/upload.php3.40 ▲0.1339.71 ▲1.21

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 54 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
classy_token
can_compress_scripts
classy_cid
db_upgraded
widget_recent-posts
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Classy: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,891 ▲13013.81 ▼0.588.11 ▲6.5139.04 ▲1.14
Dashboard /wp-admin2,208 ▲385.52 ▼0.1892.57 ▼10.3871.76 ▲30.72
Posts /wp-admin/edit.php2,119 ▲191.97 ▼0.0538.21 ▼2.1235.40 ▼1.90
Add New Post /wp-admin/post-new.php1,543 ▲823.60 ▲5.37658.87 ▲2.1963.20 ▼0.45
Media Library /wp-admin/upload.php1,416 ▲164.23 ▲0.01117.10 ▲20.6777.43 ▲35.02

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 did not uninstall successfully, leaving 8 options in the database
    • db_upgraded
    • classy_cid
    • widget_recent-posts
    • can_compress_scripts
    • classy_token
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% 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 take a closer look at the following
  • 2× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/classy/trunk/public/partials/classy-public-display.php
    • > /wp-content/plugins/classy/public/partials/classy-public-display.php
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'Classy_API' not found in wp-content/plugins/classy/admin/partials/classy-admin-display.php:13
    • > PHP Fatal error
      Uncaught Error: Class 'Classy_API' not found in wp-content/plugins/classy/trunk/admin/partials/classy-admin-display.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

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
Attributes that require attention:
  • Plugin Name: Please specify the plugin name on the first line ( === classy === )
You can look at the official readme.txt

classy/classy.php Passed 13 tests

The principal PHP file in "Classy" v. 1.2.3 is loaded by WordPress automatically on each request
71 characters long description:
A tool used to integrate Classy's API into easily accessible shortcodes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected725 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP13175627681
CSS28838
JavaScript24546

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.13
Average class complexity5.50
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity1.63
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes16
▷ Abstract classes00.00%
▷ Concrete classes16100.00%
▷ Final classes00.00%
Methods110
▷ Static methods87.27%
▷ Public methods9687.27%
▷ Protected methods00.00%
▷ Private methods1412.73%
Functions6
▷ Named functions6100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
8 PNG files occupy 0.20MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
trunk/admin/img/classy.png18.08KB0.91KB▼ 94.95%
trunk/public/img/group.png21.73KB2.95KB▼ 86.40%
admin/img/classy.png18.08KB0.91KB▼ 94.95%
public/img/group.png21.73KB2.95KB▼ 86.40%
public/img/single.png20.63KB1.63KB▼ 92.09%