78% lorem-pixels

Code Review | Lorem Pixels

WordPress plugin Lorem Pixels scored78%from 54 tests.

About plugin

  • Plugin page: lorem-pixels
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5.0-4.9.2
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Feb 4, 2018
  • Number of updates: 3
  • Update frequency: every 197.7 days
  • Top authors: pbimal (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /979 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by Lorem Pixels
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0038.05 ▼6.33
Dashboard /wp-admin3.31 ▼0.0446.92 ▼18.38
Posts /wp-admin/edit.php3.36 ▲0.0050.80 ▼1.20
Add New Post /wp-admin/post-new.php5.89 ▲0.0099.64 ▼4.17
Media Library /wp-admin/upload.php3.23 ▲0.0035.36 ▼0.89

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Lorem Pixels
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲5413.54 ▼0.671.54 ▼0.2840.75 ▼1.68
Dashboard /wp-admin2,206 ▲184.86 ▼0.17108.72 ▼0.0043.76 ▼2.18
Posts /wp-admin/edit.php2,089 ▼32.01 ▲0.0138.53 ▼0.5035.32 ▲4.79
Add New Post /wp-admin/post-new.php1,514 ▼1917.57 ▼5.51629.82 ▼8.6056.91 ▼1.75
Media Library /wp-admin/upload.php1,382 ▼34.26 ▲0.05101.26 ▼2.3646.74 ▼3.99

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • can_compress_scripts
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lorem-pixels/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lorem-pixels/classes/class.lorem_pixels.inc.php:36

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
These attributes need your attention:
  • Screenshots: Add an image for screenshot #1 (Setup)
The official readme.txt is a good inspiration

lorem-pixels/lorem-pixels.php 92% from 13 tests

The entry point to "Lorem Pixels" version 1.0.0 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 592 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Good job! No executable or dangerous file extensions detected44 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP3153944

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.05
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin