84% olympus-shortcodes

Code Review | Olympus Shortcodes

WordPress plugin Olympus Shortcodes scored84%from 54 tests.

About plugin

  • Plugin page: olympus-shortcodes
  • Plugin version: 1.0.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.2.4
  • WordPress version: 6.3.1
  • First release: Jul 22, 2015
  • Latest release: Aug 11, 2015
  • Number of updates: 10
  • Update frequency: every 2.1 days
  • Top authors: DannyCooper (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /1,967 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.01MB] [CPU: ▼6.69ms] Passed 4 tests

An overview of server-side resources used by Olympus Shortcodes
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0237.52 ▲0.29
Dashboard /wp-admin3.32 ▲0.0149.60 ▼6.64
Posts /wp-admin/edit.php3.37 ▲0.0150.55 ▼0.90
Add New Post /wp-admin/post-new.php5.90 ▲0.0185.16 ▼19.50
Media Library /wp-admin/upload.php3.24 ▲0.0140.12 ▲3.57

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

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

Browser metrics Passed 4 tests

Olympus Shortcodes: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲12513.58 ▼0.829.05 ▲7.4542.33 ▲1.66
Dashboard /wp-admin2,195 ▲155.70 ▲0.0696.98 ▲5.9440.40 ▲1.96
Posts /wp-admin/edit.php2,103 ▼02.09 ▲0.1442.71 ▲4.0534.18 ▼1.50
Add New Post /wp-admin/post-new.php1,526 ▼022.99 ▼0.55683.95 ▲0.9861.07 ▲4.47
Media Library /wp-admin/upload.php1,397 ▼04.23 ▲0.03109.36 ▲4.6247.27 ▲1.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • widget_recent-comments
    • theysaidso_admin_options

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/olympus-shortcodes/olympus-shortcodes.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Tags: Please reduce the number of tags, currently 13 tag instead of maximum 10
Please take inspiration from this readme.txt

olympus-shortcodes/olympus-shortcodes.php Passed 13 tests

The main PHP script in "Olympus Shortcodes" version 1.0.4 is automatically included on every request by WordPress
61 characters long description:
Adds shortcodes you can use in your posts, pages and widgets.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Good job! No executable or dangerous file extensions detected4,942 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
CSS334762,923
JavaScript2155129994
SVG300706
PHP2105155319

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of 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.12
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
9 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/double-line.png2.73KB0.10KB▼ 96.39%
images/dotted-light.png2.74KB0.10KB▼ 96.37%
images/minus.png0.08KB0.10KB0.00%
images/plus.png0.09KB0.10KB0.00%
images/slider-control-left.png2.77KB0.12KB▼ 95.84%