94% ace-editor-for-wp

Code Review | ACE Editor for WP

WordPress plugin ACE Editor for WP scored 94% from 54 tests.

About plugin

  • Plugin page: ace-editor-for-wp
  • Plugin version: 0.7.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.4-3.5
  • WordPress version: 5.8.1
  • First release: Oct 7, 2012
  • Latest release: Dec 14, 2012
  • Number of updates: 7
  • Update frequency: every 9.7 days
  • Top authors: daxitude (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 3,791 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼137.76ms] Passed 4 tests

This is a short check of server-side resources used by ACE Editor for WP
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.84 ▲0.1236.23 ▲13.86
Dashboard /wp-admin3.06 ▲0.0144.95 ▼3.72
Posts /wp-admin/edit.php3.12 ▲0.0145.89 ▼0.76
Add New Post /wp-admin/post-new.php5.43 ▲0.0093.27 ▼548.19
Media Library /wp-admin/upload.php3.01 ▲0.0134.24 ▲1.62

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 89 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for ACE Editor for WP
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,703 ▲10716.25 ▲0.6012.48 ▲1.9246.00 ▼4.01
Dashboard /wp-admin2,973 ▲395.94 ▼0.07141.18 ▼7.94103.52 ▼13.68
Posts /wp-admin/edit.php2,739 ▼02.70 ▼0.0183.43 ▲22.2383.96 ▼4.18
Add New Post /wp-admin/post-new.php1,849 ▲23419.48 ▼1.90384.71 ▲85.59105.77 ▲0.56
Media Library /wp-admin/upload.php1,807 ▼05.02 ▼0.00150.15 ▼21.29116.76 ▼3.31

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Uninstall script ran successfully

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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/ace-editor-for-wp/no-visual.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function is_admin() in wp-content/plugins/ace-editor-for-wp/ace4wp.php:45

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: Screenshot #1 (Editing a Page) image required
You can look at the official readme.txt

ace-editor-for-wp/ace4wp.php 92% from 13 tests

"ACE Editor for WP" version 0.7.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
It is important to fix the following:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("ace-editor-for-wp.php" instead of "ace4wp.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin280 lines of code in 85 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript812933234
PHP3121539
Markdown1607

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
1 PNG file occupies 0.17MB with 0.11MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png171.78KB57.28KB▼ 66.65%