84% classic-editor-and-classic-widgets

Code Review | Classic Editor and Classic Widgets

WordPress plugin Classic Editor and Classic Widgets scored84%from 54 tests.

About plugin

  • Plugin page: classic-editor-an...
  • Plugin version: 1.3.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.4
  • WordPress version: 6.3.1
  • First release: Jul 8, 2021
  • Latest release: Nov 6, 2023
  • Number of updates: 29
  • Update frequency: every 29.4 days
  • Top authors: wpgrim (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10,000+ active /77,739 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▼0.52MB] [CPU: ▼9.88ms] Passed 4 tests

Analyzing server-side resources used by Classic Editor and Classic Widgets
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.54 ▲0.0739.99 ▼5.28
Dashboard /wp-admin3.40 ▲0.1049.70 ▼1.31
Posts /wp-admin/edit.php3.51 ▲0.1646.44 ▲0.44
Add New Post /wp-admin/post-new.php3.54 ▼2.3559.60 ▼33.37
Media Library /wp-admin/upload.php3.32 ▲0.0944.60 ▲10.53
Classic Editor /wp-admin/options-general.php?page=classic-editor-and-classic-widgets3.3135.29

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 25 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Classic Editor and Classic Widgets
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2714.13 ▼0.222.03 ▲0.3345.27 ▼2.67
Dashboard /wp-admin2,196 ▲225.60 ▲0.0289.17 ▼10.7338.18 ▼6.09
Posts /wp-admin/edit.php2,104 ▲42.00 ▼0.0135.75 ▼1.3334.82 ▼3.81
Add New Post /wp-admin/post-new.php3,106 ▲1,5817.66 ▼15.72202.75 ▼415.5872.29 ▲19.17
Media Library /wp-admin/upload.php1,401 ▲44.26 ▲0.03102.86 ▼0.9242.29 ▼0.80
Classic Editor /wp-admin/options-general.php?page=classic-editor-and-classic-widgets1,1562.5139.7634.69

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
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded

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 | 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 fix the following items
  • 14× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'GRIM_CEW\\Settings' not found in wp-content/plugins/classic-editor-and-classic-widgets/templates/fields/radio.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/classic-editor-and-classic-widgets/templates/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/classic-editor-and-classic-widgets/templates/partials/pro-overlay.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'GRIM_CEW\\Vendor\\Controller' not found in wp-content/plugins/classic-editor-and-classic-widgets/includes/Dashboard.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_kses() in wp-content/plugins/classic-editor-and-classic-widgets/templates/fields/delimiter.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/classic-editor-and-classic-widgets/templates/fields/checkbox.php:11
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/classic-editor-and-classic-widgets/templates/fields/autocomplete.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'GRIM_CEW\\Vendor\\Controller' not found in wp-content/plugins/classic-editor-and-classic-widgets/includes/Frontend.php:7
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_names() on null in wp-content/plugins/classic-editor-and-classic-widgets/templates/settings/users.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'GRIM_CEW\\Vendor\\Controller' not found in wp-content/plugins/classic-editor-and-classic-widgets/includes/Settings.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
4 plugin tags: classic editor, disable gutenberg, classic widgets, block editor

classic-editor-and-classic-widgets/classic-editor-and-classic-widgets.php Passed 13 tests

The main PHP file in "Classic Editor and Classic Widgets" ver. 1.3.1 adds more information about the plugin and also serves as the entry point for this plugin
90 characters long description:
Disables Gutenberg editor totally everywhere and enables Classic Editor & Classic Widgets.

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
Everything looks great! No dangerous files found in this plugin1,020 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP2014229692
CSS1821210
JavaScript3267118

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity7.71
▷ Minimum class complexity1.00
▷ Maximum class complexity36.00
Average method complexity2.47
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods32
▷ Static methods1031.25%
▷ Public methods3196.88%
▷ Protected methods00.00%
▷ Private methods13.12%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants675.00%
▷ Class constants225.00%
▷ Public constants2100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin