84% classic-plus

Code Review | ClassicPlus To Enable Classic Functions

WordPress plugin ClassicPlus To Enable Classic Functions scored84%from 54 tests.

About plugin

  • Plugin page: classic-plus
  • Plugin version: 1.1.2
  • PHP compatiblity: 7.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8.2
  • WordPress version: 6.3.1
  • First release: Dec 8, 2021
  • Latest release: Jan 19, 2022
  • Number of updates: 40
  • Update frequency: every 1.1 days
  • Top authors: lzw22 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /2,255 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▲0.32MB] [CPU: ▲1.54ms] Passed 4 tests

Server-side resources used by ClassicPlus To Enable Classic Functions
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.75 ▲0.2941.82 ▼0.42
Dashboard /wp-admin3.69 ▲0.3851.38 ▼2.33
Posts /wp-admin/edit.php3.74 ▲0.3853.56 ▲5.45
Add New Post /wp-admin/post-new.php6.18 ▲0.2997.30 ▲7.23
Media Library /wp-admin/upload.php3.52 ▲0.3037.31 ▲3.45
ClassicPlus /wp-admin/options-general.php?page=classicplus3.5239.76

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

Analyzing filesystem and database footprints of this plugin
This plugin was installed successfully
Filesystem: 55 new files
Database: no new tables, 10 new options
New WordPress options
classicplus_smtp
classicplus_content
widget_theysaidso_widget
theysaidso_admin_options
classicplus_login
classicplus_basics
widget_recent-posts
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for ClassicPlus To Enable Classic Functions
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,964 ▲22915.02 ▲0.441.75 ▼0.2442.46 ▼9.44
Dashboard /wp-admin2,366 ▲1816.64 ▲0.74132.27 ▲17.3641.80 ▼3.44
Posts /wp-admin/edit.php2,275 ▲1863.59 ▲1.5457.57 ▲21.0134.96 ▼1.58
Add New Post /wp-admin/post-new.php1,540 ▲2018.53 ▼4.67616.14 ▼7.6537.49 ▼26.53
Media Library /wp-admin/upload.php1,411 ▲204.32 ▲0.1280.18 ▼17.9939.83 ▼1.79
ClassicPlus /wp-admin/options-general.php?page=classicplus1,4023.5845.3730.65

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 10 options in the database
    • classicplus_login
    • classicplus_content
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded
    • classicplus_basics
    • theysaidso_admin_options
    • classicplus_smtp
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
The following issues need your attention
  • 12× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/classic-plus/includes/class.frontend.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ClassicPlus_Settings' not found in wp-content/plugins/classic-plus/includes/class.classic.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/classic-plus/includes/class.post.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_doing_ajax() in wp-content/plugins/classic-plus/includes/class.ajax.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'ClassicPlus_Settings' not found in wp-content/plugins/classic-plus/includes/class.document.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/classic-plus/includes/class.settings.php:235
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/classic-plus/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'ClassicPlus_Settings' not found in wp-content/plugins/classic-plus/includes/class.gravatar.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'ClassicPlus_Settings' not found in wp-content/plugins/classic-plus/includes/class.email.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/classic-plus/views/documents.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
8 plugin tags: limit, link manager, classic, highlight, demo...

classic-plus/classic-plus.php 92% from 13 tests

This is the main PHP file of "ClassicPlus To Enable Classic Functions" version 1.1.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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
No dangerous file extensions were detected11,742 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
SVG30128,954
PHP143111991,435
CSS12206971,110
JavaScript62810243

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity15.17
▷ Minimum class complexity1.00
▷ Maximum class complexity69.00
Average method complexity2.64
▷ Minimum method complexity1.00
▷ Maximum method complexity13.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes12
▷ Abstract classes00.00%
▷ Concrete classes12100.00%
▷ Final classes00.00%
Methods87
▷ Static methods5967.82%
▷ Public methods87100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions00.00%
▷ Anonymous functions2100.00%
Constants0
▷ Global constants00.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
5 PNG files occupy 0.09MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png19.59KB8.50KB▼ 56.60%
assets/screenshot-2.png25.18KB11.37KB▼ 54.86%
assets/icon-256x256.png2.94KB2.56KB▼ 12.94%
assets/screenshot-4.png28.36KB11.14KB▼ 60.71%
assets/screenshot-3.png13.01KB5.71KB▼ 56.15%