84% achilles-shortcodes

Code Review | AchillesTheme-shortcodes

WordPress plugin AchillesTheme-shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: achilles-shortcodes
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Apr 1, 2016
  • Latest release: Mar 30, 2016
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: strailejoey (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /678 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼4.63ms] Passed 4 tests

This is a short check of server-side resources used by AchillesTheme-shortcodes
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0640.19 ▼2.45
Dashboard /wp-admin3.38 ▲0.0748.28 ▼5.22
Posts /wp-admin/edit.php3.42 ▲0.0650.48 ▼2.35
Add New Post /wp-admin/post-new.php5.95 ▲0.0687.57 ▼8.50
Media Library /wp-admin/upload.php3.29 ▲0.0645.61 ▲11.63

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for AchillesTheme-shortcodes
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,017 ▲23114.32 ▼0.032.04 ▲0.1043.34 ▼0.87
Dashboard /wp-admin2,433 ▲2535.56 ▼0.1188.05 ▼1.9078.39 ▲35.80
Posts /wp-admin/edit.php2,341 ▲2411.99 ▼0.0336.25 ▼3.5134.58 ▼4.58
Add New Post /wp-admin/post-new.php1,917 ▲39122.29 ▼1.08728.93 ▲43.6958.75 ▲1.55
Media Library /wp-admin/upload.php1,635 ▲2354.20 ▲0.0599.46 ▼10.4774.49 ▲29.25

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 75% 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 no errors were found, this is by no means 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
Almost there! Just fix the following items
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/achilles-shortcodes/achilles-shortcodes.php:403
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/achilles-shortcodes/achilles-tinymce-button.php:4

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
1 plugin tags: shortcodes

achilles-shortcodes/achilles-shortcodes.php 92% from 13 tests

Analyzing the main PHP file in "AchillesTheme-shortcodes" version 0.1
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 159 characters long)

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
Everything looks great! No dangerous files found in this plugin454 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP34435454

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.73
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%
Functions10
▷ Named functions10100.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
PNG images were not found in this plugin