10% recent-post-lazy-load

Code Review | Recent Post Lazy Load

WordPress plugin Recent Post Lazy Load scored10%from 54 tests.

About plugin

  • Plugin page: recent-post-lazy-...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6-4.9
  • WordPress version: 6.3.1
  • First release: Feb 13, 2015
  • Latest release: Feb 25, 2018
  • Number of updates: 4
  • Update frequency: every 277.0 days
  • Top authors: contact4sajid (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,484 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
You still need to fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/recent-post-lazy-load/inc/widget/widget.php+282
    Function create_function() is deprecated

Server metrics [RAM: ▼1.96MB] [CPU: ▼62.81ms] Passed 4 tests

Analyzing server-side resources used by Recent Post Lazy Load
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /2.03 ▼1.445.00 ▼37.12
Dashboard /wp-admin2.05 ▼1.265.49 ▼46.36
Posts /wp-admin/edit.php2.05 ▼1.314.99 ▼45.12
Add New Post /wp-admin/post-new.php2.05 ▼3.845.52 ▼122.65
Media Library /wp-admin/upload.php2.05 ▼1.185.16 ▼28.42

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 12 new files
Database: no new tables, 8 new options
New WordPress options
can_compress_scripts
db_upgraded
theysaidso_admin_options
widget_rp_widget
rp_all_options
widget_recent-comments
widget_theysaidso_widget
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Recent Post Lazy Load
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,887 ▲12613.46 ▼0.898.32 ▲6.6041.15 ▲0.93
Dashboard /wp-admin2,195 ▲215.64 ▲0.0493.44 ▼8.1880.57 ▲22.36
Posts /wp-admin/edit.php2,115 ▲152.00 ▼0.0339.25 ▲2.8939.35 ▲5.38
Add New Post /wp-admin/post-new.php1,555 ▲2021.03 ▲2.96703.06 ▲65.5151.55 ▼16.89
Media Library /wp-admin/upload.php1,418 ▲214.23 ▲0.0498.44 ▼2.5670.07 ▲27.53

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/recent-post-lazy-load/inc/widget/widget.php+282
    Function create_function() is deprecated
  • Zombie WordPress options were found after uninstall: 8 options
    • widget_recent-posts
    • widget_recent-comments
    • rp_all_options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_rp_widget
    • db_upgraded
    • can_compress_scripts

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Almost there! Just fix the following items
  • 4× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/recent-post-lazy-load/rp-lazy-load.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/recent-post-lazy-load/inc/admin/settings.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/recent-post-lazy-load/inc/front-end/shortcode.php:18
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/recent-post-lazy-load/inc/widget/widget.php:8

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)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Attributes that require attention:
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
Please take inspiration from this readme.txt

recent-post-lazy-load/rp-lazy-load.php 85% from 13 tests

"Recent Post Lazy Load" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("recent-post-lazy-load.php" instead of "rp-lazy-load.php")
  • Description: Keep the plugin description shorter than 140 characters (currently 541 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected678 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP525487587
CSS116081
JavaScript10010

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.19
Average class complexity20.00
▷ Minimum class complexity20.00
▷ Maximum class complexity20.00
Average method complexity5.75
▷ Minimum method complexity1.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 methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions19
▷ Named functions19100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
2 PNG files occupy 0.11MB with 0.06MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png34.37KB17.00KB▼ 50.55%
screenshot-1.png78.02KB34.69KB▼ 55.54%