56% wp-smart-editor

Code Review | WP Smart Editor

WordPress plugin WP Smart Editor scored56%from 54 tests.

About plugin

  • Plugin page: wp-smart-editor
  • Plugin version: 1.3.3
  • PHP compatiblity: 5.3+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.9.8
  • WordPress version: 6.3.1
  • First release: Jul 10, 2017
  • Latest release: Apr 22, 2019
  • Number of updates: 69
  • Update frequency: every 9.6 days
  • Top authors: JoomUnited (100%)

Code review

54 tests

User reviews

14 reviews

Install metrics

2,000+ active /33,271 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲1.11MB] [CPU: ▲16.03ms] Passed 4 tests

Server-side resources used by WP Smart Editor
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /4.54 ▲1.0855.36 ▲12.94
Dashboard /wp-admin4.43 ▲1.1268.31 ▲15.34
Posts /wp-admin/edit.php4.44 ▲1.0876.21 ▲17.95
Add New Post /wp-admin/post-new.php7.45 ▲1.56114.53 ▲17.87
Media Library /wp-admin/upload.php4.37 ▲1.1559.81 ▲22.79
Import/Export settings /wp-admin/admin.php?&page=wpse-import-export4.3356.13
Template manager /wp-admin/admin.php?&page=wpse-htmltemplate4.3249.15
Configuration /wp-admin/edit.php?post_type=wpse_profiles&page=wpse-config5.1155.63
Insert Bullet /wp-admin/admin.php?&page=wpse-bullet4.3755.55
Insert Columns /wp-admin/admin.php?&page=wpse-columns4.3354.62
Insert Button /wp-admin/admin.php?&page=wpse-button4.3952.98

Server storage [IO: ▲8.60MB] [DB: ▲0.11MB] 67% from 3 tests

How much does this plugin use your filesystem and database?
Please fix the following
  • There were 662 files (7,084.80KB) illegally modified outside of "wp-content/plugins/wp-smart-editor/" and "wp-content/uploads/"
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/calendar-jos.css
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/jaofiletree.css
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/chosen-sprite.png
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/chosen-sprite@2x.png
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/chosen.css
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/bootstrap.scss
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/index.html
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/ajax-loader.gif
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/icon_close.png
    • (new file) wp-content/plugins/wp-file-download-light/app/admin/assets/css/bootstrap.min.css
    • ...
Filesystem: 746 new files
Database: 6 new tables, 14 new options
New tables
wp_wpfd_statistics
wp_wptm_styles
wp_wptm_charttypes
wp_wptm_charts
wp_wptm_tables
wp_wptm_categories
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_theysaidso_widget
wpse_config
db_upgraded
_wpfd_search_page_id
wpse_auto_active_extra_plugins
wpfdl_version
wpse_button_styles
wpfd-category_children
...

Browser metrics Passed 4 tests

Checking browser requirements for WP Smart Editor
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,009 ▲26314.07 ▼0.5112.37 ▲10.2543.17 ▼10.52
Dashboard /wp-admin2,286 ▲985.24 ▼0.66103.16 ▼12.4644.69 ▼2.71
Posts /wp-admin/edit.php2,172 ▲802.39 ▲0.4036.46 ▼0.0936.73 ▼0.12
Add New Post /wp-admin/post-new.php1,649 ▲11618.07 ▼5.03650.69 ▼30.2336.62 ▼26.03
Media Library /wp-admin/upload.php1,474 ▲864.54 ▲0.3298.23 ▼12.6342.96 ▼2.22
Import/Export settings /wp-admin/admin.php?&page=wpse-import-export9112.0227.3229.41
Template manager /wp-admin/admin.php?&page=wpse-htmltemplate8982.1229.0828.57
Configuration /wp-admin/edit.php?post_type=wpse_profiles&page=wpse-config1,7153.6669.7999.53
Insert Bullet /wp-admin/admin.php?&page=wpse-bullet1,3042.8338.4743.10
Insert Columns /wp-admin/admin.php?&page=wpse-columns1,0833.0740.9518.48
Insert Button /wp-admin/admin.php?&page=wpse-button1,5933.2652.5129.34

Uninstaller [IO: ▲6.92MB] [DB: ▲0.10MB] 50% 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 failed, leaving 6 tables in the database
    • wp_wptm_tables
    • wp_wptm_charts
    • wp_wptm_charttypes
    • wp_wptm_categories
    • wp_wpfd_statistics
    • wp_wptm_styles
  • Zombie WordPress options were found after uninstall: 14 options
    • can_compress_scripts
    • wpse_auto_active_extra_plugins
    • widget_theysaidso_widget
    • wpse_button_styles
    • wptml_version
    • wpfdl_version
    • wpfd-category_children
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • ...

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These server-side errors were triggered
    • > GET request to /wp-admin/admin.php?&page=wpse-htmltemplate
    • > Warning in wp-content/plugins/wp-smart-editor/plugins/htmltemplate/htmltemplate.php+30
    count(): Parameter must be an array or an object that implements Countable
    • > GET request to /wp-admin/admin.php?&page=wpse-htmltemplate
    • > Warning in wp-content/plugins/wp-smart-editor/plugins/htmltemplate/htmltemplate.php+31
    Invalid argument supplied for foreach()

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 16× PHP files perform the action of outputting non-empty strings when accessed directly (only 10 are shown):
    • > /wp-content/plugins/wp-smart-editor/inc/wpse-main.php
    • > /wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/install.php
    • > /wp-content/plugins/wp-smart-editor/install.php
    • > /wp-content/plugins/wp-smart-editor/inc/wpse-profiles.php
    • > /wp-content/plugins/wp-smart-editor/plugins/button/button.php
    • > /wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/site/helpers/table_template.inc.php
    • > /wp-content/plugins/wp-smart-editor/plugins/htmltemplate/htmltemplate.php
    • > /wp-content/plugins/wp-smart-editor/inc/wpse-configuration.php
    • > /wp-content/plugins/wp-smart-editor/plugins/columns/columns.php
    • > /wp-content/plugins/wp-smart-editor/plugins/bulletedmanager/bulletmngr.php
  • 11× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: headers in wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/site/helpers/table_template.inc.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/wp-smart-editor/extensions/wp-file-download-light/app/site/themes/empty-wpfd-category.php:9
    • > PHP Notice
      Undefined variable: result in wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/site/helpers/table_template.inc.php on line 11
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/wp-smart-editor/extensions/wp-file-download-light/app/admin/views/file/tpl/versions.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'Mobile_Detect' not found in wp-content/plugins/wp-smart-editor/inc/Mobile-Detect-2.8.25/namespaced/Detection/MobileDetect.php:22
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/site/helpers/table_template.inc.php on line 11
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/app/site/helpers/table_template.inc.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function language_attributes() in wp-content/plugins/wp-smart-editor/extensions/wp-file-download-light/app/site/themes/single-wpfd-file.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-smart-editor/extensions/wp-table-manager-light/wp-table-manager-light.php:47
    • > PHP Fatal error
      Uncaught Error: Class 'Mobile_Detect' not found in wp-content/plugins/wp-smart-editor/inc/Mobile-Detect-2.8.25/export/exportToJSON.php:26

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Please fix the following browser errors
    • > GET request to /wp-admin/admin.php?&page=wpse-htmltemplate
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'activeEditor')" "TypeError: Cannot read properties of undefined (reading 'activeEditor')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-smart-editor/plugins/htmltemplate/htmltemplate.js?ver=6.3.1:12:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?&page=wpse-button
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28721 Uncaught TypeError: Cannot read properties of undefined (reading 'activeEditor')
    • > GET request to /wp-admin/admin.php?&page=wpse-bullet
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'activeEditor')" "TypeError: Cannot read properties of undefined (reading 'activeEditor')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-smart-editor/plugins/bulletedmanager/bulleted.js?ver=6.3.1:21:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/admin.php?&page=wpse-button
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1 1:28609 "jQuery.Deferred exception: Cannot read properties of undefined (reading 'activeEditor')" "TypeError: Cannot read properties of undefined (reading 'activeEditor')\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/wp-smart-editor/plugins/button/button.js?ver=6.3.1:283:33)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils&ver=6.3.1:2:27292)" undefined

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 88% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots need descriptions #2, #3, #4, #5, #6, #7 in wp-smart-editor/assets to your readme.txt
  • Tags: There are too many tags (13 tag instead of maximum 10)
Please take inspiration from this readme.txt

wp-smart-editor/wp-smart-editor.php Passed 13 tests

Analyzing the main PHP file in "WP Smart Editor" version 1.3.3
36 characters long description:
Smart and powerful tool for editing.

Code Analysis 97% from 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 detected108,227 lines of code in 329 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1199,2317,42255,429
CSS612,80693419,584
PHP1273,0474,58616,852
SVG10009,895
Sass12605,808
XML4101151411
Markdown2930195
JSON30037
YAML11515
HTML1001

PHP code 50% from 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
It is recommended to fix the following
  • Please reduce cyclomatic complexity of methods to less than 100 (currently 134)
Cyclomatic complexity
Average complexity per logical line of code0.43
Average class complexity28.64
▷ Minimum class complexity1.00
▷ Maximum class complexity370.00
Average method complexity5.66
▷ Minimum method complexity1.00
▷ Maximum method complexity134.00
Code structure
Namespaces6
Interfaces0
Traits0
Classes94
▷ Abstract classes00.00%
▷ Concrete classes94100.00%
▷ Final classes00.00%
Methods546
▷ Static methods549.89%
▷ Public methods37769.05%
▷ Protected methods14426.37%
▷ Private methods254.58%
Functions90
▷ Named functions8291.11%
▷ Anonymous functions88.89%
Constants35
▷ Global constants2674.29%
▷ Class constants925.71%
▷ Public constants9100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
332 PNG files occupy 0.75MB with 0.24MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
extensions/wp-file-download-light/app/site/assets/images/jao/directory.png1.02KB0.16KB▼ 84.25%
extensions/wp-file-download-light/app/site/assets/images/theme/wma.png0.60KB0.60KB0.00%
extensions/wp-file-download-light/app/site/assets/images/theme/small/tiff.png3.44KB0.94KB▼ 72.80%
extensions/wp-file-download-light/app/admin/assets/images/jao/txt.png0.33KB0.46KB0.00%
extensions/wp-file-download-light/app/admin/assets/images/jao/music.png0.38KB0.61KB0.00%