74% wp-fiddle

Code Review | WP Fiddle

WordPress plugin WP Fiddle scored 74% from 54 tests.

About plugin

  • Plugin page: wp-fiddle
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.4.1
  • WordPress version: 6.3.1
  • First release: Nov 23, 2012
  • Latest release: Mar 2, 2013
  • Number of updates: 3
  • Update frequency: every 37.7 days
  • Top authors: heera (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,348 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Installer ran successfully

Server metrics [RAM: ▼0.95MB] [CPU: ▼41.48ms] Passed 4 tests

An overview of server-side resources used by WP Fiddle
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0140.79 ▼3.86
Dashboard /wp-admin3.00 ▼0.3122.49 ▼26.26
Posts /wp-admin/edit.php3.00 ▼0.3623.26 ▼43.56
Add New Post /wp-admin/post-new.php3.00 ▼2.8919.96 ▼80.00
Media Library /wp-admin/upload.php3.00 ▼0.2321.46 ▼16.10

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

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

Browser metrics Passed 4 tests

A check of browser resources used by WP Fiddle
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲8013.25 ▼1.421.75 ▼0.0543.67 ▼0.20
Dashboard /wp-admin2,224 ▲355.88 ▲0.77106.84 ▼7.1979.89 ▲37.32
Posts /wp-admin/edit.php2,108 ▲192.06 ▲0.0538.96 ▲1.4136.72 ▲2.70
Add New Post /wp-admin/post-new.php1,537 ▲2318.43 ▲0.97645.70 ▼51.0961.88 ▲12.83
Media Library /wp-admin/upload.php1,403 ▲154.17 ▲0.0599.56 ▼19.8073.38 ▲26.22

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though everything seems fine, this is not an exhaustive test

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
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-fiddle/wp_fiddle.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (The JSFiddle settings page.), #2 (The insert/embed Fiddle button in editor.), #3 (The shortcode generated by the plug-in)
Please take inspiration from this readme.txt

wp-fiddle/wp_fiddle.php 92% from 13 tests

The main file in "WP Fiddle" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
You should first fix the following items:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("wp-fiddle.php" instead of "wp_fiddle.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin187 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP1911158
JavaScript20029

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.67
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
4 PNG files occupy 0.16MB with 0.07MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png71.79KB30.91KB▼ 56.95%
screenshot-3.png44.38KB16.48KB▼ 62.87%
js/images/jsfiddle-icon.png0.65KB0.64KB▼ 1.35%
screenshot-2.png44.16KB20.45KB▼ 53.70%