84% picafto

Code Review | Picafto - One-click Lazy load images (ACF compatible)

WordPress plugin Picafto - One-click Lazy load images (ACF compatible) scored84%from 54 tests.

About plugin

  • Plugin page: picafto
  • Plugin version: 1.1
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.9-5.2.1
  • WordPress version: 6.3.1
  • First release: Jun 16, 2019
  • Latest release: Jun 20, 2019
  • Number of updates: 12
  • Update frequency: every 0.3 days
  • Top authors: melmacaluso (100%)

Code review

54 tests

User reviews

4 reviews

Install metrics

10+ active /1,120 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

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

Server-side resources used by Picafto - One-click Lazy load images (ACF compatible)
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.31 ▼8.51
Dashboard /wp-admin3.32 ▲0.0147.42 ▼3.27
Posts /wp-admin/edit.php3.37 ▲0.0147.87 ▼4.18
Add New Post /wp-admin/post-new.php5.90 ▲0.0191.96 ▼1.98
Media Library /wp-admin/upload.php3.24 ▲0.0132.20 ▼3.45

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Picafto - One-click Lazy load images (ACF compatible)
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,831 ▲8514.80 ▲0.411.94 ▲0.2242.75 ▼0.30
Dashboard /wp-admin2,211 ▲234.86 ▼0.0398.19 ▼16.4438.82 ▼9.18
Posts /wp-admin/edit.php2,091 ▲52.00 ▼0.0537.12 ▼0.4335.85 ▼3.81
Add New Post /wp-admin/post-new.php1,539 ▲518.21 ▼5.05618.32 ▼57.4659.42 ▲7.50
Media Library /wp-admin/upload.php1,387 ▼14.22 ▲0.0497.97 ▲3.1745.63 ▼0.86

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 75% 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 50% 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 fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/picafto/includes/filter_content.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/picafto/picafto.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 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
6 plugin tags: page speed, lazy load images, lazy load, improve ranking, optimize...

picafto/picafto.php Passed 13 tests

Analyzing the main PHP file in "Picafto - One-click Lazy load images (ACF compatible)" version 1.1
113 characters long description:
Instantly, automatically and painlessly make your website faster by reducing image payload and lazy loading them.

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
Success! There were no dangerous files found in this plugin45 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP2121344
JavaScript1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.41
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions250.00%
▷ Anonymous functions250.00%
Constants2
▷ Global constants2100.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 were not PNG files found in your plugin