67% wp-editor

Code Review | WP Editor

WordPress plugin WP Editor scored67%from 54 tests.

About plugin

  • Plugin page: wp-editor
  • Plugin version: 1.2.7
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-4.6.1
  • WordPress version: 6.3.1
  • First release: Jan 30, 2012
  • Latest release: Sep 27, 2022
  • Number of updates: 66
  • Update frequency: every 59.0 days
  • Top authors: benjaminprojas (95.45%)peterwilsoncc (6.06%)

Code review

54 tests

User reviews

94 reviews

Install metrics

40,000+ active /950,453 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

This is a short check of server-side resources used by WP Editor
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0344.61 ▼3.07
Dashboard /wp-admin3.42 ▲0.0756.44 ▼11.09
Posts /wp-admin/edit.php3.51 ▲0.1654.40 ▲2.90
Add New Post /wp-admin/post-new.php6.10 ▲0.2289.72 ▼13.59
Media Library /wp-admin/upload.php3.35 ▲0.1238.73 ▲1.85
Plugin Editor /wp-admin/plugins.php?page=wpeditor_plugin3.4335.19
Theme Editor /wp-admin/themes.php?page=wpeditor_themes3.9046.93

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 83 new files
Database: 1 new table, 7 new options
New tables
wp_wpeditor_settings
New WordPress options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
db_upgraded
wpe_settings
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP Editor
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,896 ▲13514.25 ▼0.122.18 ▲0.4647.50 ▲4.74
Dashboard /wp-admin2,285 ▲825.99 ▲0.18111.07 ▲3.10101.34 ▲60.61
Posts /wp-admin/edit.php2,118 ▲111.98 ▼0.0741.68 ▲0.5834.39 ▲0.23
Add New Post /wp-admin/post-new.php1,548 ▼618.37 ▲0.25729.71 ▲101.9266.80 ▲17.25
Media Library /wp-admin/upload.php1,415 ▲184.28 ▲0.03119.38 ▲17.6745.54 ▼1.58
Plugin Editor /wp-admin/plugins.php?page=wpeditor_plugin1,4982.9768.7979.13
Theme Editor /wp-admin/themes.php?page=wpeditor_themes1,6514.6785.61144.91

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • Uninstall procedure validation failed for this plugin
    • > Notice in wp-content/plugins/wp-editor/uninstall.php+6
    Constant WPEDITOR_PATH already defined
  • The uninstall procedure has failed, leaving 7 options in the database
    • wpe_settings
    • widget_recent-posts
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Almost there, just fix the following server-side errors
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=wpeditor_themes
    • > User deprecated in wp-includes/functions.php+5463
    Function screen_icon is deprecated since version 3.8.0 with no alternative available.
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/themes.php?page=wpeditor_themes
    • > User deprecated in wp-includes/functions.php+5463
    Function get_screen_icon is deprecated since version 3.8.0 with no alternative available.

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please take a closer look at the following
  • 5× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_bloginfo() in wp-content/plugins/wp-editor/wpeditor.php:35
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-editor/views/theme-editor.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function screen_icon() in wp-content/plugins/wp-editor/views/plugin-editor.php:3
    • > PHP Fatal error
      Uncaught Error: Class 'WPEditorSetting' not found in wp-content/plugins/wp-editor/views/settings.php:2
    • > PHP Fatal error
      Uncaught Error: Class 'WPEditorSetting' not found in wp-content/plugins/wp-editor/views/OLDsettings.php:3

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Tags: There are too many tags (18 tag instead of maximum 10)
  • Screenshots: These screenshots require images: #1 (Settings page for WP Editor), #2 (Syntax highlighting in Page/Post editor), #3 (Updated plugin editor with Ajax file browser), #4 (Updated theme editor with file upload enabled), #5 (Fancybox integration)
Please take inspiration from this readme.txt

wp-editor/wpeditor.php 77% from 13 tests

"WP Editor" version 1.2.7's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
Please make the necessary changes and 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
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-editor.php" instead of "wpeditor.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected16,880 lines of code in 47 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript201,2811,29411,814
PHP163041593,683
CSS9801281,377
SQL2006

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity33.80
▷ Minimum class complexity2.00
▷ Maximum class complexity91.00
Average method complexity6.66
▷ Minimum method complexity1.00
▷ Maximum method complexity35.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes10
▷ Abstract classes00.00%
▷ Concrete classes10100.00%
▷ Final classes00.00%
Methods58
▷ Static methods5289.66%
▷ Public methods58100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
31 PNG files occupy 1.16MB with 0.93MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/less.png3.15KB0.47KB▼ 84.98%
screenshot-1.png113.71KB37.21KB▼ 67.28%
extensions/nivo-lightbox/themes/default/next@2x.png4.14KB0.98KB▼ 76.27%
images/sql.png3.20KB0.53KB▼ 83.40%
extensions/nivo-lightbox/themes/default/next.png3.12KB0.32KB▼ 89.60%