68% wp-editor-with-uploader

Code Review | WP-edtior-with-uploader

WordPress plugin WP-edtior-with-uploader scored68%from 54 tests.

About plugin

  • Plugin page: wp-editor-with-up...
  • Plugin version: 0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.3
  • WordPress version: 6.3.1
  • First release: Mar 29, 2016
  • Latest release: Mar 26, 2016
  • Number of updates: 2
  • Update frequency: every 0.5 days
  • Top authors: mrxx (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /700 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.00MB] [CPU: ▼7.47ms] Passed 4 tests

A check of server-side resources used by WP-edtior-with-uploader
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0139.49 ▼6.71
Dashboard /wp-admin3.32 ▼0.0350.56 ▼13.97
Posts /wp-admin/edit.php3.37 ▲0.0150.19 ▼0.23
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.55 ▼7.64
Media Library /wp-admin/upload.php3.24 ▲0.0137.71 ▼1.56

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

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

Browser metrics Passed 4 tests

WP-edtior-with-uploader: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.12 ▼0.131.75 ▲0.0542.50 ▼1.73
Dashboard /wp-admin2,189 ▲145.63 ▼0.0288.05 ▼27.3139.55 ▼2.65
Posts /wp-admin/edit.php2,103 ▼02.03 ▲0.0540.49 ▲5.3435.33 ▲0.34
Add New Post /wp-admin/post-new.php1,526 ▼923.46 ▲5.26648.17 ▼39.2759.45 ▼16.72
Media Library /wp-admin/upload.php1,397 ▼04.12 ▼0.06101.19 ▼18.1143.87 ▼6.91

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
You still need to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-editor-with-uploader/js/plupload-2.1.8/examples/upload.php
    • > /wp-content/plugins/wp-editor-with-uploader/js/plupload-2.1.8/examples/dump.php
    • > /wp-content/plugins/wp-editor-with-uploader/js/plupload-2.1.8/examples/jquery/s3.php
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-editor-with-uploader/wp-editor-with-uploader.php:22

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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
These attributes need to be fixed:
  • Plugin Name: Please specify the plugin name on the first line ( === wp-editor-with-uploader === )
You can take inspiration from this readme.txt

wp-editor-with-uploader/wp-editor-with-uploader.php 92% from 13 tests

The primary PHP file in "WP-edtior-with-uploader" version 0.8 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Text Domain: The text domain name should consist of only dashes and lowercase characters

Code Analysis 5% from 3 tests

File types 0% from 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Almost there! Just fix the following issues
  • Do not include executable or dangerous files in your plugin
    • .xap - Silverlight Application Package in Microsoft Silverlight
      • wp-content/plugins/wp-editor-with-uploader/js/plupload-2.1.8/js/Moxie.xap
10,335 lines of code in 126 files:
LanguageFilesBlank linesComment linesLines of code
JavaScript1042,7254,1868,643
CSS813322682
HTML610928491
PHP45978210
SVG200192
Markdown2330117

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.39
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%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
4 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
js/plupload-2.1.8/js/jquery.plupload.queue/img/transp50.png0.39KB0.11KB▼ 72.18%
js/plupload-2.1.8/js/jquery.ui.plupload/img/plupload.png6.44KB2.99KB▼ 53.58%
js/plupload-2.1.8/js/jquery.plupload.queue/img/buttons.png1.41KB1.15KB▼ 18.00%
js/plupload-2.1.8/js/jquery.plupload.queue/img/buttons-disabled.png1.26KB1.02KB▼ 19.20%