10% lazy-pinner

Code Review | Lazy Pinner

WordPress plugin Lazy Pinner scored10%from 54 tests.

About plugin

  • Plugin page: lazy-pinner
  • Plugin version: 2.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.5.1
  • WordPress version: 6.3.1
  • First release: May 8, 2013
  • Latest release: Jun 9, 2013
  • Number of updates: 12
  • Update frequency: every 2.8 days
  • Top authors: leethompson (100%)

Code review

54 tests

User reviews

7 reviews

Install metrics

10+ active /3,597 total downloads

Benchmarks

Plugin footprint 23% 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
  • The plugin did not install without errors
    • > Compile error in wp-content/plugins/lazy-pinner/includes/pinit.php+40
    Redefinition of parameter $token

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

An overview of server-side resources used by Lazy Pinner
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0039.23 ▲2.07
Dashboard /wp-admin3.31 ▼0.0445.00 ▼15.19
Posts /wp-admin/edit.php3.36 ▲0.0044.07 ▲0.27
Add New Post /wp-admin/post-new.php5.89 ▲0.0083.63 ▼16.94
Media Library /wp-admin/upload.php3.23 ▲0.0034.17 ▼0.68

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 14 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments

Browser metrics Passed 4 tests

Lazy Pinner: an overview of browser usage
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲4314.09 ▼0.371.68 ▲0.2344.33 ▼1.28
Dashboard /wp-admin2,198 ▲185.62 ▼0.0485.40 ▼0.3737.08 ▼4.89
Posts /wp-admin/edit.php2,100 ▼02.01 ▲0.0533.23 ▼1.1434.49 ▲0.62
Add New Post /wp-admin/post-new.php1,536 ▲1023.10 ▼0.03659.48 ▼25.9252.97 ▼1.04
Media Library /wp-admin/upload.php1,397 ▼64.18 ▲0.01101.91 ▼0.5242.94 ▼1.54

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
Please fix the following items
  • The plugin did not uninstall gracefully
    • > Compile error in wp-content/plugins/lazy-pinner/includes/pinit.php+40
    Redefinition of parameter $token
  • Incomplete uninstall procedure, leaving 14 files (0.48MB) in the plugin directory
    • (new file) images/pass.png
    • (new file) images/url.png
    • (new file) images/key.png
    • (new file) images/icon.png
    • (new file) includes/auth.php
    • (new file) images/questionMarkIcon_SMALL.jpg
    • (new file) includes/admin.php
    • (new file) images/boards.png
    • (new file) images/email.png
    • (new file) images/user.png
    • ...
  • The uninstall procedure has failed, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • recovery_mode_email_last_sent
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts

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)
Even though no errors were found, this is by no means an exhaustive test

SRP 50% 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
  • 5× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lazy-pinner/lazypinner.php:76
    • > PHP Parse error
      syntax error, unexpected end of file in wp-content/plugins/lazy-pinner/includes/admin.php on line 262
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_results() on null in wp-content/plugins/lazy-pinner/includes/log.php:28
    • > PHP Notice
      Trying to get property 'prefix' of non-object in wp-content/plugins/lazy-pinner/includes/log.php on line 27
    • > PHP Fatal error
      Redefinition of parameter $token in wp-content/plugins/lazy-pinner/includes/pinit.php on line 40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need your attention:
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === lazy-pinner === )
The official readme.txt is a good inspiration

lazy-pinner/lazypinner.php 92% from 13 tests

The principal PHP file in "Lazy Pinner" v. 2.3 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Main file name: Name the main plugin file the same as the plugin slug ("lazy-pinner.php" instead of "lazypinner.php")

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 plugin447 lines of code in 5 files:
LanguageFilesBlank linesComment linesLines of code
PHP57597447

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.12
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%
Functions10
▷ Named functions10100.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
7 PNG files occupy 0.45MB with 0.30MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/url.png44.15KB13.67KB▼ 69.03%
images/boards.png114.03KB23.64KB▼ 79.27%
images/pass.png121.62KB48.43KB▼ 60.18%
images/email.png121.95KB48.54KB▼ 60.19%
images/user.png41.02KB12.47KB▼ 69.59%