62% lockets

Code Review | Lockets

WordPress plugin Lockets scored62%from 54 tests.

About plugin

  • Plugin page: lockets
  • Plugin version: 0.999
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.0
  • WordPress version: 6.3.1
  • First release: Aug 26, 2017
  • Latest release: Jun 24, 2022
  • Number of updates: 71
  • Update frequency: every 24.8 days
  • Top authors: wackey (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

100+ active /5,182 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

Server metrics [RAM: ▼0.60MB] [CPU: ▼33.54ms] Passed 4 tests

This is a short check of server-side resources used by Lockets
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.82 ▲0.3643.48 ▲6.15
Dashboard /wp-admin3.35 ▲0.0128.65 ▼29.41
Posts /wp-admin/edit.php3.35 ▼0.0024.12 ▼21.53
Add New Post /wp-admin/post-new.php3.35 ▼2.5426.96 ▼74.96
Media Library /wp-admin/upload.php3.35 ▲0.1224.70 ▼8.26
Lockets /wp-admin/admin.php?page=lockets/lockets.php3.3524.37
楽天ウェブサービス /wp-admin/admin.php?page=admin_rakuten3.3538.81
Google プレイス /wp-admin/admin.php?page=admin_gmap3.3525.15
リクルートWEBサービス /wp-admin/admin.php?page=admin_recruit_webservice3.3524.92
外部配信β /wp-admin/admin.php?page=admin_feed3.3524.07
じゃらんWebサービス /wp-admin/admin.php?page=admin_jalan_webservice3.3530.59
その他アフィリエイト /wp-admin/admin.php?page=admin_affiliate3.3523.47

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Lockets
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,856 ▲8513.38 ▼0.9914.59 ▲12.6945.05 ▲3.55
Dashboard /wp-admin2,250 ▲585.84 ▲0.8896.14 ▼12.4647.54 ▲3.60
Posts /wp-admin/edit.php2,136 ▲472.05 ▲0.0535.01 ▲0.3342.80 ▲8.65
Add New Post /wp-admin/post-new.php1,571 ▲4423.25 ▲5.03649.74 ▲18.9652.17 ▲1.91
Media Library /wp-admin/upload.php1,438 ▲534.26 ▲0.10100.32 ▼5.5252.56 ▲7.82
Lockets /wp-admin/admin.php?page=lockets/lockets.php1,4989.37279.29156.24
楽天ウェブサービス /wp-admin/admin.php?page=admin_rakuten9002.0223.7184.67
Google プレイス /wp-admin/admin.php?page=admin_gmap9392.0222.2275.44
リクルートWEBサービス /wp-admin/admin.php?page=admin_recruit_webservice8992.1721.9482.17
外部配信β /wp-admin/admin.php?page=admin_feed8871.7225.6366.97
じゃらんWebサービス /wp-admin/admin.php?page=admin_jalan_webservice8932.0224.2262.18
その他アフィリエイト /wp-admin/admin.php?page=admin_affiliate9132.0322.5648.23

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Almost there, just fix the following server-side errors
  • 119 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=admin_affiliate
    • > User deprecated in wp-includes/functions.php+5737
    Function has_cap was called with an argument that is deprecated since version 2.0.0! Usage of user levels is deprecated. Use capabilities instead.
  • 19 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=admin_affiliate
    • > User deprecated in wp-includes/functions.php+5453
    Function attribute_escape is deprecated since version 2.8.0! Use esc_attr() instead.

SRP 0% 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
Please fix the following
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/lockets/lib/remoteaddr.php
  • 3× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function feed_content_type() in wp-content/plugins/lockets/feeds/lctfmt.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lockets/lib/mediabutton.php:7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/lockets/lib/mediabutton.php:7

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser errors were detected

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid url: ""
The official readme.txt is a good inspiration

lockets/lockets.php 92% from 13 tests

The main PHP script in "Lockets" version 0.999 is automatically included on every request by WordPress
The following require your attention:
  • Description: Please keep the plugin description shorter than 140 characters (currently 435 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected2,358 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP164452512,278
JavaScript23057
HTML16623

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.17
Average class complexity8.50
▷ Minimum class complexity3.00
▷ Maximum class complexity18.00
Average method complexity5.50
▷ Minimum method complexity3.00
▷ Maximum method complexity10.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods10
▷ Static methods00.00%
▷ Public methods10100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions36
▷ Named functions36100.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
6 compressed PNG files occupy 0.04MB
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/powered_by_google_on_non_white_hdpi.png3.05KB3.51KB0.00%
images/powered_by_google_on_white.png2.08KB2.14KB0.00%
icon16.png0.49KB0.52KB0.00%
images/powered_by_google_on_white_hdpi.png4.44KB3.56KB▼ 19.85%
images/powered_by_google_on_non_white.png1.37KB1.97KB0.00%