88% smart-editor

Code Review | Smart Editor

WordPress plugin Smart Editor scored 88% from 54 tests.

About plugin

  • Plugin page: smart-editor
  • Plugin version: 0.8.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-3.8.1
  • WordPress version: 5.8.1
  • First release: Aug 12, 2013
  • Latest release: Mar 5, 2014
  • Number of updates: 20
  • Update frequency: every 10.6 days
  • Top authors: wadadanet (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

50+ active / 2,629 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.08MB] [CPU: ▼159.65ms] Passed 4 tests

Server-side resources used by Smart Editor
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.89 ▲0.1739.90 ▲16.31
Dashboard /wp-admin3.13 ▲0.0745.28 ▼7.34
Posts /wp-admin/edit.php3.24 ▲0.1351.98 ▲3.97
Add New Post /wp-admin/post-new.php5.49 ▲0.0597.30 ▼634.96
Media Library /wp-admin/upload.php3.07 ▲0.0735.14 ▼0.27

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 37 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Smart Editor
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,684 ▲8816.35 ▲0.8311.13 ▼1.9849.77 ▼6.47
Dashboard /wp-admin2,975 ▲445.96 ▲0.00149.90 ▼10.72120.15 ▼3.17
Posts /wp-admin/edit.php2,750 ▲112.71 ▼0.0068.37 ▼7.04100.27 ▲2.18
Add New Post /wp-admin/post-new.php1,701 ▲1818.83 ▲2.59376.77 ▼64.28128.20 ▲0.90
Media Library /wp-admin/upload.php1,815 ▲85.02 ▼0.01160.16 ▲1.53125.27 ▼1.99
SmartEditor /wp-admin/smarteditor.php260.900.1311.20

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
This plugin's uninstaller ran successfully

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function load_plugin_textdomain() in wp-content/plugins/smart-editor/smarteditor.php:27

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
These are user-side errors you should fix
    • > GET request to /wp-admin/smarteditor.php
    • > Network (severe)
    wp-admin/smarteditor.php - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
4 plugin tags: editor, wysiwyg, preview, html5

smart-editor/smarteditor.php 92% from 13 tests

"Smart Editor" version 0.8.2's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("smart-editor.php" instead of "smarteditor.php")

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
Success! There were no dangerous files found in this plugin1,921 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript81301191,048
CSS11917493
PHP45167316
PO File2192064

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity17.00
Average method complexity1.95
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods21
▷ Static methods00.00%
▷ Public methods21100.00%
▷ Protected methods00.00%
▷ 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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
18 compressed PNG files occupy 0.01MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
img/icon-underline.png0.42KB0.39KB▼ 8.74%
img/icon-blockquote.png0.48KB0.59KB0.00%
img/icon-ul.png0.29KB0.31KB0.00%
img/icon-ol.png0.39KB0.36KB▼ 8.19%
img/icon-cssbtn.png0.53KB0.58KB0.00%