78% sublime-custom-js-editor

Code Review | Sublime Custom JS Editor

WordPress plugin Sublime Custom JS Editor scored 78% from 54 tests.

About plugin

  • Plugin page: sublime-custom-js...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-4.4
  • WordPress version: 6.3.1
  • First release: Dec 23, 2015
  • Latest release: Dec 23, 2015
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: AsianCoders (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

300+ active / 3,782 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.03MB] [CPU: ▼4.04ms] Passed 4 tests

A check of server-side resources used by Sublime Custom JS Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0342.82 ▼2.53
Dashboard /wp-admin3.34 ▲0.0449.17 ▼4.34
Posts /wp-admin/edit.php3.39 ▲0.0346.96 ▲1.41
Add New Post /wp-admin/post-new.php5.92 ▲0.0383.19 ▼10.69
Media Library /wp-admin/upload.php3.26 ▲0.0337.72 ▲3.26

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 29 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Sublime Custom JS Editor
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.41 ▼0.201.71 ▼0.1444.82 ▼1.92
Dashboard /wp-admin2,210 ▲225.90 ▲0.04111.61 ▼8.3044.88 ▲1.29
Posts /wp-admin/edit.php2,093 ▲252.17 ▲0.1236.33 ▲1.1131.67 ▼2.84
Add New Post /wp-admin/post-new.php1,536 ▲1723.37 ▲0.43644.48 ▲38.0067.69 ▲19.49
Media Library /wp-admin/upload.php1,392 ▲74.27 ▲0.03101.13 ▼11.4940.61 ▼2.99
Sublime Custom js /wp-admin/sublime-custom-js-editor.php260.440.1117.22

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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 items
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/sublime-custom-js-editor/inc/sublimejsedit_function.php
    • > /wp-content/plugins/sublime-custom-js-editor/sublime-custom-js-editor.php

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
These are user-side errors you should fix
    • > GET request to /wp-admin/sublime-custom-js-editor.php
    • > Network (severe)
    wp-admin/sublime-custom-js-editor.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

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
9 plugin tags: sublime text, editor, js editor, custom js, js...

sublime-custom-js-editor/sublime-custom-js-editor.php 92% from 13 tests

"Sublime Custom JS Editor" version 1.0'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: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin13,099 lines of code in 27 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript181,6073,08612,500
CSS77327468
PHP22836131

PHP code Passed 2 tests

An overview 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.12
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions8
▷ Named functions8100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
There were not PNG files found in your plugin