10% lorem-ipsum-and-place-holder-image-generator

Code Review | Lorem Ipsum and Place Holder Image Generator

WordPress plugin Lorem Ipsum and Place Holder Image Generator scored10%from 54 tests.

About plugin

  • Plugin page: lorem-ipsum-and-p...
  • Plugin version: 0.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.4
  • WordPress version: 6.3.1
  • First release: Nov 19, 2012
  • Latest release: Nov 21, 2012
  • Number of updates: 10
  • Update frequency: every 50.8 days
  • Top authors: bythegram (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,393 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
These installer errors require your attention
  • This plugin did not install gracefully
    • > Warning in wp-content/plugins/lorem-ipsum-and-place-holder-image-generator/ag_lorem.php+19
    Use of undefined constant ag_lorem_func - assumed 'ag_lorem_func' (this will throw an Error in a future version of PHP)

Server metrics [RAM: ▼1.93MB] [CPU: ▼54.30ms] Passed 4 tests

This is a short check of server-side resources used by Lorem Ipsum and Place Holder Image Generator
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /2.06 ▼1.414.78 ▼34.38
Dashboard /wp-admin2.08 ▼1.235.26 ▼46.87
Posts /wp-admin/edit.php2.08 ▼1.286.34 ▼45.88
Add New Post /wp-admin/post-new.php2.08 ▼3.817.13 ▼90.05
Media Library /wp-admin/upload.php2.08 ▼1.155.15 ▼30.87

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

How much does this plugin use your filesystem and database?
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Lorem Ipsum and Place Holder Image Generator
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.30 ▼1.501.60 ▼0.0640.28 ▼1.92
Dashboard /wp-admin2,206 ▲184.87 ▼1.03111.67 ▼12.7241.39 ▼3.95
Posts /wp-admin/edit.php2,089 ▼32.17 ▲0.2039.61 ▼0.7235.01 ▼1.69
Add New Post /wp-admin/post-new.php1,547 ▲1418.22 ▼4.95604.65 ▼34.7156.00 ▼0.35
Media Library /wp-admin/upload.php1,382 ▼94.29 ▲0.0898.00 ▼0.7642.94 ▼1.71

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Please fix the following items
  • Uninstall procedure validation failed for this plugin
    • > Warning in wp-content/plugins/lorem-ipsum-and-place-holder-image-generator/ag_lorem.php+19
    Use of undefined constant ag_lorem_func - assumed 'ag_lorem_func' (this will throw an Error in a future version of PHP)
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget

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)
Everything seems fine, however 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
Please take a closer look at the following
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lorem-ipsum-and-place-holder-image-generator/ag_lorem.php:31
    • > PHP Warning
      Use of undefined constant ag_lorem_func - assumed 'ag_lorem_func' (this will throw an Error in a future version of PHP) in wp-content/plugins/lorem-ipsum-and-place-holder-image-generator/ag_lorem.php on line 19

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

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: shortcode, lorem ipsum

lorem-ipsum-and-place-holder-image-generator/ag_lorem.php 92% from 13 tests

Analyzing the main PHP file in "Lorem Ipsum and Place Holder Image Generator" version 0.2
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("lorem-ipsum-and-place-holder-image-generator.php" instead of "ag_lorem.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin35 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP171935

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.25
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%
Functions2
▷ Named functions2100.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
No PNG images were found in this plugin