74% classifiers

Code Review | Classifiers

WordPress plugin Classifiers scored74%from 54 tests.

About plugin

  • Plugin page: classifiers
  • Plugin version: 1.1
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Aug 18, 2015
  • Latest release: Sep 17, 2015
  • Number of updates: 5
  • Update frequency: every 6.0 days
  • Top authors: taavi.aasver (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,272 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Classifiers
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0842.85 ▲2.60
Dashboard /wp-admin3.38 ▲0.0747.05 ▼7.77
Posts /wp-admin/edit.php3.49 ▲0.1348.74 ▲4.27
Add New Post /wp-admin/post-new.php5.96 ▲0.0780.76 ▼9.16
Media Library /wp-admin/upload.php3.30 ▲0.0734.93 ▲0.71

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

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

Browser metrics Passed 4 tests

Checking browser requirements for Classifiers
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,837 ▲10213.26 ▼1.402.15 ▲0.3844.55 ▼3.29
Dashboard /wp-admin2,218 ▲305.90 ▼0.00102.57 ▼1.5238.47 ▼2.92
Posts /wp-admin/edit.php2,098 ▲92.05 ▲0.0635.13 ▲0.3933.96 ▲2.46
Add New Post /wp-admin/post-new.php1,544 ▲223.31 ▲4.99680.64 ▲71.1254.15 ▼0.66
Media Library /wp-admin/upload.php1,400 ▲124.23 ▲0.06100.40 ▼0.8341.62 ▼4.03

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The plugin did not uninstall successfully, leaving 2 tables in the database
    • wp_wpc_classifier
    • wp_wpc_category
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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)
Everything seems fine, however this is by no means an exhaustive test

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 take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/classifiers/classifiers.php:17

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 93% from 29 tests

readme.txt 88% 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
Please fix the following attributes:
  • Requires at least: Invalid version format
  • Donate link: Invalid url: "-"
You can look at the official readme.txt

classifiers/classifiers.php Passed 13 tests

Analyzing the main PHP file in "Classifiers" version 1.1
115 characters long description:
Instead of hard-coding certain texts (selectable options) to your template, make them manageable on the admin side.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
There were no executable files found in this plugin316 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23315316

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity29.50
▷ Minimum class complexity11.00
▷ Maximum class complexity48.00
Average method complexity3.71
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods21
▷ Static methods14.76%
▷ Public methods2095.24%
▷ Protected methods14.76%
▷ 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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin