78% facebook-like-page-locker-lite

Code Review | Like Page Locker Lite

WordPress plugin Like Page Locker Lite scored78%from 54 tests.

About plugin

  • Plugin page: facebook-like-pag...
  • Plugin version: 1.0.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-5.2
  • WordPress version: 6.3.1
  • First release: Apr 10, 2016
  • Latest release: Jul 25, 2019
  • Number of updates: 10
  • Update frequency: every 120.5 days
  • Top authors: Happy Coders (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active /14,356 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼5.52ms] Passed 4 tests

Analyzing server-side resources used by Like Page Locker Lite
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.55 ▲0.0847.53 ▲10.66
Dashboard /wp-admin3.36 ▲0.0146.07 ▼9.89
Posts /wp-admin/edit.php3.41 ▲0.0542.99 ▼0.02
Add New Post /wp-admin/post-new.php5.94 ▲0.0578.92 ▼15.42
Media Library /wp-admin/upload.php3.28 ▲0.0537.94 ▲3.26

Server storage [IO: ▲0.19MB] [DB: ▲0.07MB] Passed 3 tests

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 19 new files
Database: no new tables, 7 new options
New WordPress options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
flpll_settings
db_upgraded
can_compress_scripts
theysaidso_admin_options

Browser metrics Passed 4 tests

An overview of browser requirements for Like Page Locker Lite
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,918 ▲15713.50 ▼1.059.13 ▲7.6042.89 ▲3.35
Dashboard /wp-admin2,208 ▲335.55 ▼0.1988.76 ▼11.9637.49 ▼6.19
Posts /wp-admin/edit.php2,116 ▲161.99 ▲0.0437.33 ▲2.2832.82 ▼11.22
Add New Post /wp-admin/post-new.php1,549 ▲2318.70 ▼4.32618.68 ▼53.4865.86 ▲20.78
Media Library /wp-admin/upload.php1,419 ▲194.19 ▼0.0097.79 ▲1.4044.33 ▼0.63

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin does not fully uninstall, leaving 7 options in the database
    • can_compress_scripts
    • db_upgraded
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • flpll_settings

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/facebook-like-page-locker-lite/inc/backend/tabs/upgrade.php
    • > /wp-content/plugins/facebook-like-page-locker-lite/facebook-like-page-locker-lite.php
  • 7× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/facebook-like-page-locker-lite/inc/frontend/front-locker.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/facebook-like-page-locker-lite/inc/backend/tabs/locker-settings.php:3
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/facebook-like-page-locker-lite/inc/cores/save-settings.php:59
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/facebook-like-page-locker-lite/inc/backend/tabs/like-settings.php:4
    • > PHP Fatal error
      Uncaught Error: Using $this when not in object context in wp-content/plugins/facebook-like-page-locker-lite/inc/cores/activation.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/facebook-like-page-locker-lite/inc/backend/settings.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/facebook-like-page-locker-lite/inc/backend/tabs/about-us.php:2

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 errors were detected

Optimizations

Plugin configuration 97% 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:
  • Tags: Please delete some tags, you are using 12 tag instead of maximum 10
The official readme.txt might help

facebook-like-page-locker-lite/facebook-like-page-locker-lite.php Passed 13 tests

This is the main PHP file of "Like Page Locker Lite" version 1.0.3, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
81 characters long description:
A simple wordpress plugin to lock your page till someone likes your facebook page

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
Everything looks great! No dangerous files found in this plugin1,104 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP974126631
CSS282340
JavaScript22518133

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity19.00
▷ Minimum class complexity19.00
▷ Maximum class complexity19.00
Average method complexity2.06
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods17
▷ Static methods00.00%
▷ Public methods17100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.13MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/like-button-preview.png40.30KB13.62KB▼ 66.19%
images/like-box-preview.png92.77KB26.37KB▼ 71.58%