71% librafire-pinpoints

Code Review | LibraFire PinPoints

WordPress plugin LibraFire PinPoints scored71%from 54 tests.

About plugin

  • Plugin page: librafire-pinpoints
  • Plugin version: 1.1.6
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0-4.5.3
  • WordPress version: 6.3.1
  • First release: Feb 4, 2016
  • Latest release: Aug 2, 2016
  • Number of updates: 15
  • Update frequency: every 12.1 days
  • Top authors: LibraFire (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /902 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
This plugin's installer ran successfully

Server metrics [RAM: ▲0.24MB] [CPU: ▲0.18ms] Passed 4 tests

Analyzing server-side resources used by LibraFire PinPoints
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.68 ▲0.2244.86 ▲3.89
Dashboard /wp-admin3.54 ▲0.2454.76 ▲2.82
Posts /wp-admin/edit.php3.65 ▲0.3055.23 ▲3.99
Add New Post /wp-admin/post-new.php6.14 ▲0.2589.63 ▼7.54
Media Library /wp-admin/upload.php3.46 ▲0.2338.85 ▲1.54
LF PinPoints /wp-admin/options-general.php?page=LF_PinPoints_settings3.4643.83

Server storage [IO: ▲0.13MB] [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: 27 new files
Database: no new tables, 8 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
librafire_pinpoints_version
LF_PinPoints_version
widget_recent-posts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

LibraFire PinPoints: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,975 ▲22913.89 ▼0.525.93 ▲3.8739.27 ▼6.14
Dashboard /wp-admin2,242 ▲545.35 ▼0.51118.91 ▲1.9742.01 ▼1.66
Posts /wp-admin/edit.php2,124 ▲352.48 ▲0.4741.09 ▲3.4430.90 ▼7.85
Add New Post /wp-admin/post-new.php1,541 ▲823.22 ▼0.03685.82 ▲26.2737.08 ▼21.74
Media Library /wp-admin/upload.php1,415 ▲244.53 ▲0.32105.25 ▲1.0050.40 ▲4.97
LF PinPoints /wp-admin/options-general.php?page=LF_PinPoints_settings1,3383.7373.9229.93

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 7 options
    • widget_recent-comments
    • widget_theysaidso_widget
    • LF_PinPoints_version
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 3× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/librafire-pinpoints/templates/frontend-css-dynamic.php
    • > /wp-content/plugins/librafire-pinpoints/templates/admin-css-dynamic.php
    • > /wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php
  • 31× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Notice
      Undefined variable: dotOptions in wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php on line 19
    • > PHP Notice
      Undefined variable: coordinates in wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php on line 13
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php on line 13
    • > PHP Notice
      Undefined variable: single_dot in wp-content/plugins/librafire-pinpoints/templates/single-dot.php on line 14
    • > PHP Notice
      Undefined variable: coordinates in wp-content/plugins/librafire-pinpoints/templates/single-dot.php on line 10
    • > PHP Notice
      Trying to get property 'dot_id' of non-object in wp-content/plugins/librafire-pinpoints/templates/single-dot.php on line 10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/librafire-pinpoints/includes/lib/class-lf-generate-editor.php:3
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php on line 12
    • > PHP Notice
      Undefined variable: coordinates in wp-content/plugins/librafire-pinpoints/templates/single-dot-frontend.php on line 12
    • > PHP Notice
      Undefined variable: post_dots_size in wp-content/plugins/librafire-pinpoints/templates/frontend-css-dynamic.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There are user-side issues you should fix
    • > GET request to /wp-admin/options-general.php?page=LF_PinPoints_settings
    • > Console-api (warning) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic,moxiejs,plupload&ver=6.3.1 1:28609 "jQuery.Deferred exception: jQuery(...).live is not a function" "TypeError: jQuery(...).live is not a function\n at HTMLDocument.\u003Canonymous> (/wp-content/plugins/librafire-pinpoints/assets/js/admin.min.js?ver=1.0.0:96:36)\n at e (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic,moxiejs,plupload&ver=6.3.1:2:26990)\n at t (/wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic,moxiejs,plupload&ver=6.3.1:2:27292)" undefined
    • > GET request to /wp-admin/options-general.php?page=LF_PinPoints_settings
    • > Javascript (severe) in unknown
    /wp-admin/load-scripts.php?c=0&load%5Bchunk_0%5D=jquery-core,jquery-migrate,utils,farbtastic,moxiejs,plupload&ver=6.3.1 1:28721 Uncaught TypeError: jQuery(...).live is not a function

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 88% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention:
  • Screenshots: Please describe screenshot #2 in librafire-pinpoints/assets to your readme.txt
  • Tags: Please delete some tags, you are using 13 tag instead of maximum 10
You can take inspiration from this readme.txt

librafire-pinpoints/lf-pinpoints.php 77% from 13 tests

The entry point to "LibraFire PinPoints" version 1.1.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug
  • Main file name: Name the main plugin file the same as the plugin slug ("librafire-pinpoints.php" instead of "lf-pinpoints.php")
  • Requires at least: Required version must be the same as the one declared in readme.txt ("3.5.1" instead of "4.0")

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
There were no executable files found in this plugin2,399 lines of code in 24 files:
LanguageFilesBlank linesComment linesLines of code
PHP133044681,026
JavaScript7194180812
CSS3142547
JSON10014

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.34
Average class complexity21.00
▷ Minimum class complexity5.00
▷ Maximum class complexity63.00
Average method complexity3.45
▷ Minimum method complexity1.00
▷ Maximum method complexity45.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods49
▷ Static methods714.29%
▷ Public methods4489.80%
▷ Protected methods00.00%
▷ Private methods510.20%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
There are no PNG files in this plugin