84% wp-codemirror-themes

Code Review | WP CodeMirror Themes

WordPress plugin WP CodeMirror Themes scored84%from 54 tests.

About plugin

  • Plugin page: wp-codemirror-themes
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-5.9.3
  • WordPress version: 6.3.1
  • First release: Feb 19, 2019
  • Latest release: May 7, 2022
  • Number of updates: 7
  • Update frequency: every 167.6 days
  • Top authors: TacoCode (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /695 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼8.27ms] Passed 4 tests

A check of server-side resources used by WP CodeMirror Themes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0235.60 ▼1.92
Dashboard /wp-admin3.34 ▼0.0146.41 ▼12.69
Posts /wp-admin/edit.php3.39 ▲0.0342.73 ▼5.78
Add New Post /wp-admin/post-new.php5.92 ▲0.0388.14 ▼12.67
Media Library /wp-admin/upload.php3.26 ▲0.0336.35 ▲3.29
CodeMirror Themes /wp-admin/tools.php?page=codemirror_theme3.2329.08

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 61 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
db_upgraded
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options

Browser metrics Passed 4 tests

Checking browser requirements for WP CodeMirror Themes
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5415.06 ▲0.841.56 ▼0.1144.53 ▲6.38
Dashboard /wp-admin2,206 ▲266.56 ▲0.86126.68 ▲41.6539.14 ▼2.63
Posts /wp-admin/edit.php2,095 ▼83.38 ▲1.4272.19 ▲37.4335.78 ▲6.58
Add New Post /wp-admin/post-new.php1,543 ▲1719.27 ▼3.87647.66 ▼13.0666.65 ▲12.18
Media Library /wp-admin/upload.php1,411 ▲85.12 ▲0.93146.44 ▲49.8447.16 ▲1.29
CodeMirror Themes /wp-admin/tools.php?page=codemirror_theme1,4603.4978.6439.17

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

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
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_attr() in wp-content/plugins/wp-codemirror-themes/includes/theme_list_select.php:1
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html() in wp-content/plugins/wp-codemirror-themes/includes/options_page_template.php:2

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: codemirror, codeeditor, admin

wp-codemirror-themes/wp-codemirror-themes.php 92% from 13 tests

The primary PHP file in "WP CodeMirror Themes" version 1.0.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Domain Path: The domain path points to a folder that does not exist ("/languages")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Success! There were no dangerous files found in this plugin1,870 lines of code in 59 files:
LanguageFilesBlank linesComment linesLines of code
CSS553362541,710
PHP31653132
Markdown113028

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity8.00
▷ Minimum class complexity8.00
▷ Maximum class complexity8.00
Average method complexity1.78
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods9100.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

PNG files should be compressed to save space and minimize bandwidth usage
No PNG files were detected