78% easy-code-placement

Code Review | Easy Code Placement

WordPress plugin Easy Code Placement scored78%from 54 tests.

About plugin

  • Plugin page: easy-code-placement
  • Plugin version: 18.11
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.9.8
  • WordPress version: 6.3.1
  • First release: May 28, 2014
  • Latest release: Nov 16, 2018
  • Number of updates: 90
  • Update frequency: every 18.2 days
  • Top authors: wassereimer (100%)

Code review

54 tests

User reviews

6 reviews

Install metrics

700+ active /30,450 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.14MB] [CPU: ▼5.90ms] Passed 4 tests

This is a short check of server-side resources used by Easy Code Placement
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1043.12 ▲1.42
Dashboard /wp-admin3.44 ▲0.1448.77 ▼3.16
Posts /wp-admin/edit.php3.54 ▲0.1848.09 ▼1.04
Add New Post /wp-admin/post-new.php6.12 ▲0.2380.93 ▼19.05
Media Library /wp-admin/upload.php3.38 ▲0.1537.04 ▼0.33
Easy Code Placement /wp-admin/options-general.php?page=ecp3.3640.08

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

Filesystem and database footprint
There were no storage issued detected upon installing this plugin
Filesystem: 33 new files
Database: 2 new tables, 7 new options
New tables
wp_ecp_options
wp_ecp_data
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_recent-comments
widget_ecp_widget
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Easy Code Placement: an overview of browser usage
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.071.90 ▲0.1939.78 ▼7.99
Dashboard /wp-admin2,199 ▲195.64 ▲0.0684.79 ▼6.4040.08 ▼4.63
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0035.51 ▼1.2134.45 ▼0.65
Add New Post /wp-admin/post-new.php1,529 ▲323.06 ▲0.01609.47 ▼100.6447.42 ▼10.14
Media Library /wp-admin/upload.php1,404 ▲14.18 ▲0.0799.29 ▼6.6643.43 ▼3.25
Easy Code Placement /wp-admin/options-general.php?page=ecp1,8552.6463.9532.75

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
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_ecp_widget
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

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
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/easy-code-placement/easy-code-placement.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/home.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/actions/edit.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/actions/status.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/actions/settings.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/install.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/actions/add.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/error.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/pages/system.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/load.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function ecp_check_access() in wp-content/plugins/easy-code-placement/inc/pages/help.php:6

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === easy-code-placement === )
  • Tags: There are too many tags (51 tag instead of maximum 10)
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (Options-menu), #2 (Add new code), #3 (Edit existing code), #4 (Text-widget with shortcode inside), #5 (Own widget with shortcode-selection), #6 (Settings), #7 (System informations)
The official readme.txt is a good inspiration

easy-code-placement/easy-code-placement.php Passed 13 tests

The entry point to "Easy Code Placement" version 18.11 is a PHP file that has certain tags in its header comment area
61 characters long description:
A great Wordpress Plugin to place ANY Code ANYWHERE you want.

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
Good job! No executable or dangerous file extensions detected1,208 lines of code in 22 files:
LanguageFilesBlank linesComment linesLines of code
PHP16195246909
PO File1111143264
CSS23924
JavaScript321311

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity10.00
▷ Minimum class complexity10.00
▷ Maximum class complexity10.00
Average method complexity3.25
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions18
▷ Named functions18100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
7 PNG files occupy 0.17MB with 0.08MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-7.png72.93KB40.30KB▼ 44.73%
screenshot-4.png9.03KB4.98KB▼ 44.81%
screenshot-1.png28.05KB13.11KB▼ 53.27%
screenshot-5.png9.62KB5.33KB▼ 44.57%
screenshot-3.png14.42KB7.29KB▼ 49.46%