79% lorem-toolbox

Code Review | Lorem Toolbox

WordPress plugin Lorem Toolbox scored 79% from 54 tests.

About plugin

  • Plugin page: lorem-toolbox
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.1-5.2
  • WordPress version: 6.3.1
  • First release: Nov 4, 2019
  • Latest release: Nov 18, 2019
  • Number of updates: 3
  • Update frequency: every 5.7 days
  • Top authors: erdembircan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 430 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Installer ran successfully

Server metrics [RAM: ▲0.11MB] [CPU: ▼6.52ms] Passed 4 tests

A check of server-side resources used by Lorem Toolbox
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1138.16 ▼5.98
Dashboard /wp-admin3.41 ▲0.1144.06 ▼3.74
Posts /wp-admin/edit.php3.52 ▲0.1744.11 ▼6.56
Add New Post /wp-admin/post-new.php6.01 ▲0.1381.81 ▼9.80
Media Library /wp-admin/upload.php3.33 ▲0.1136.74 ▲0.83
🧰 lorem toolbox settings /wp-admin/options-general.php?page=eb_lorem_slug3.3333.68

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 18 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
eb_lorem__options
can_compress_scripts
db_upgraded
widget_recent-posts
widget_recent-comments

Browser metrics Passed 4 tests

Lorem Toolbox: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6913.66 ▼0.714.83 ▲3.0442.35 ▼9.96
Dashboard /wp-admin2,210 ▲224.84 ▼1.05104.26 ▲1.3941.07 ▼3.88
Posts /wp-admin/edit.php2,093 ▲12.01 ▼0.0436.25 ▼8.8836.84 ▼0.65
Add New Post /wp-admin/post-new.php6,535 ▲5,00220.17 ▼2.92940.58 ▲307.2871.79 ▲18.01
Media Library /wp-admin/upload.php1,392 ▲14.21 ▲0.0195.39 ▲1.2150.34 ▲10.41
🧰 lorem toolbox settings /wp-admin/options-general.php?page=eb_lorem_slug1,0632.7454.1759.07

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
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please take a closer look at the following
  • 1× PHP files perform the task of outputting text when accessed with GET requests:
    • > /wp-content/plugins/lorem-toolbox/includes/lorem_meta_box_display.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Notice
      Undefined variable: have_lorem_shortcut in wp-content/plugins/lorem-toolbox/includes/lorem_meta_box_display.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function settings_fields() in wp-content/plugins/lorem-toolbox/includes/settings-page.php:27
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/lorem-toolbox/lorem-toolbox.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
4 plugin tags: generate, post, development, lorem

lorem-toolbox/lorem-toolbox.php Passed 13 tests

The main PHP file in "Lorem Toolbox" ver. 1.0.1 adds more information about the plugin and also serves as the entry point for this plugin
72 characters long description:
Plugin for auto content generation for development and testing purposes.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
There were no executable files found in this plugin770 lines of code in 15 files:
LanguageFilesBlank linesComment linesLines of code
PHP580194457
JavaScript61946191
CSS215273
JSON20049

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity16.50
▷ Minimum class complexity13.00
▷ Maximum class complexity20.00
Average method complexity2.41
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces3
Interfaces0
Traits1
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods1773.91%
▷ Protected methods00.00%
▷ Private methods626.09%
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

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin