84% lorem-shortcode

Code Review | lorem shortcode

WordPress plugin lorem shortcode scored84%from 54 tests.

About plugin

  • Plugin page: lorem-shortcode
  • Plugin version: 1.3.3
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8.6-4.7
  • WordPress version: 6.3.1
  • First release: Dec 3, 2010
  • Latest release: Dec 12, 2016
  • Number of updates: 17
  • Update frequency: every 129.5 days
  • Top authors: PerS (100%)

Code review

54 tests

User reviews

1 review

Install metrics

200+ active /12,489 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.15ms] Passed 4 tests

An overview of server-side resources used by lorem shortcode
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.55 ▼4.39
Dashboard /wp-admin3.31 ▲0.0151.52 ▼2.91
Posts /wp-admin/edit.php3.36 ▲0.0052.21 ▲2.00
Add New Post /wp-admin/post-new.php5.89 ▲0.0089.23 ▼21.38
Media Library /wp-admin/upload.php3.23 ▲0.0042.20 ▲0.08

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

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

Browser metrics Passed 4 tests

A check of browser resources used by lorem shortcode
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5413.27 ▼0.961.87 ▼0.1841.03 ▼5.13
Dashboard /wp-admin2,221 ▲154.86 ▼0.06108.52 ▲4.1337.83 ▼1.85
Posts /wp-admin/edit.php2,079 ▼242.02 ▲0.0235.93 ▼4.0237.24 ▲1.32
Add New Post /wp-admin/post-new.php1,545 ▼323.34 ▲0.06647.59 ▲2.8461.83 ▲4.02
Media Library /wp-admin/upload.php1,400 ▼04.21 ▼0.06104.00 ▼11.3246.92 ▼0.83

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments

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
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
Please fix the following items
  • 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/lorem-shortcode/lorem-shortcode.php:195

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
6 plugin tags: shortcode, lorem ipsum, dummy image, shortcake, shortcode-ui...

lorem-shortcode/lorem-shortcode.php 85% from 13 tests

This is the main PHP file of "lorem shortcode" version 1.3.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Domain Path: The domain path folder does not exist ("/languages")
  • Description: Keep the plugin description shorter than 140 characters (currently 203 characters long)

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 plugin141 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11640141

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity15.00
▷ Minimum class complexity15.00
▷ Maximum class complexity15.00
Average method complexity4.50
▷ Minimum method complexity2.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods375.00%
▷ Protected methods00.00%
▷ Private methods125.00%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.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
There are no PNG files in this plugin