72% wp-lorem

Code Review | WP Lorem (WL)

WordPress plugin WP Lorem (WL) scored72%from 54 tests.

About plugin

  • Plugin page: wp-lorem
  • Plugin version: 0.1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.6.1
  • WordPress version: 6.3.1
  • First release: Aug 17, 2016
  • Latest release: Nov 1, 2016
  • Number of updates: 16
  • Update frequency: every 4.8 days
  • Top authors: NivNoiman (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /2,682 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
Install script ran successfully

Server metrics [RAM: ▼0.23MB] [CPU: ▼20.27ms] Passed 4 tests

An overview of server-side resources used by WP Lorem (WL)
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.33 ▼5.08
Dashboard /wp-admin3.08 ▼0.2730.84 ▼33.82
Posts /wp-admin/edit.php3.22 ▼0.1434.25 ▼13.85
Add New Post /wp-admin/post-new.php5.46 ▼0.4373.79 ▼24.68
Media Library /wp-admin/upload.php3.15 ▼0.0828.69 ▼8.72
WP Lorem /wp-admin/admin.php?page=wp_lorem3.0627.77
Insert New /wp-admin/admin.php?page=wplorem_nn_insert_new3.0628.42
Delete Posts /wp-admin/admin.php?page=wplorem_nn_delete_posts3.0627.59

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 17 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

WP Lorem (WL): an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,839 ▲7814.58 ▲0.211.68 ▲0.1943.88 ▲1.46
Dashboard /wp-admin2,245 ▲655.60 ▼0.0892.58 ▲4.9436.05 ▼9.12
Posts /wp-admin/edit.php2,150 ▲502.04 ▲0.0439.99 ▲2.4434.79 ▼1.35
Add New Post /wp-admin/post-new.php1,570 ▲4223.67 ▲0.71689.95 ▲27.2060.38 ▼8.40
Media Library /wp-admin/upload.php1,453 ▲504.31 ▲0.07102.43 ▼0.2845.63 ▲0.95
WP Lorem /wp-admin/admin.php?page=wp_lorem9381.6724.4627.49
Insert New /wp-admin/admin.php?page=wplorem_nn_insert_new9271.6827.1131.28
Delete Posts /wp-admin/admin.php?page=wplorem_nn_delete_posts8841.6925.6030.67

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
These errors were triggered by the plugin
  • 6 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=wplorem_nn_delete_posts
    • > User notice in wp-includes/functions.php+5905
    Function WP_Scripts::localize was called incorrectly. The $l10n parameter must be an array. To pass arbitrary data to scripts, use the wp_add_inline_script() function instead. Please see Debugging in WordPress for more information. (This message was added in version 5.7.0.)

SRP 0% 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
  • 6× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/wp-lorem/admin/pages/wplorem-delete_posts.php
    • > /wp-content/plugins/wp-lorem/admin/pages/wplorem-insert_new.php
    • > /wp-content/plugins/wp-lorem/wp-lorem.php
    • > /wp-content/plugins/wp-lorem/admin/wplorem_ajax-functions.php
    • > /wp-content/plugins/wp-lorem/admin/pages/wplorem-admin.php
    • > /wp-content/plugins/wp-lorem/admin/wplorem_functions.php
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function sanitize_text_field() in wp-content/plugins/wp-lorem/admin/inc/menu.php:3

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 88% from 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
These attributes need your attention:
  • Screenshots: These screenshots need descriptions #5, #6 in wp-lorem/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can look at the official readme.txt

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

Analyzing the main PHP file in "WP Lorem (WL)" version 0.1.4
41 characters long description:
WP Lorem , import data to your Wordpress.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin203 lines of code in 12 files:
LanguageFilesBlank linesComment linesLines of code
PHP7331181
CSS20019
JavaScript3003

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions28
▷ Named functions28100.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
3 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/wplorem-btn_mce_20x20.png1.18KB0.26KB▼ 77.98%
admin/images/wplorem-csscheckbox.png0.18KB0.11KB▼ 38.67%
admin/images/wplorem-btn_mce_40x20.png1.38KB0.37KB▼ 72.98%