66% lr-services

Code Review | LR Services

WordPress plugin LR Services scored66%from 54 tests.

About plugin

  • Plugin page: lr-services
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.9.4
  • WordPress version: 6.3.1
  • First release: Apr 4, 2018
  • Latest release: Apr 5, 2018
  • Number of updates: 10
  • Update frequency: every 0.1 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /617 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed successfully, without throwing any errors or notices

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

Analyzing server-side resources used by LR Services
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.75 ▲5.06
Dashboard /wp-admin3.34 ▲0.0448.36 ▼0.02
Posts /wp-admin/edit.php3.39 ▲0.0444.84 ▼8.51
Add New Post /wp-admin/post-new.php5.92 ▲0.0480.44 ▼18.12
Media Library /wp-admin/upload.php3.26 ▲0.0336.97 ▲7.16
LR Services /wp-admin/edit.php?post_type=lrservice3.3037.17
Add New /wp-admin/post-new.php?post_type=lrservice3.3845.37
Settings /wp-admin/edit.php?post_type=lrservice&page=lr-service-setting-page3.2035.36
LR Free Plugins /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins3.2629.86

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for LR Services
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,846 ▲11113.79 ▼0.652.68 ▲1.0853.99 ▲15.38
Dashboard /wp-admin2,237 ▲465.82 ▲0.9599.34 ▼14.6040.91 ▼3.61
Posts /wp-admin/edit.php2,126 ▲372.02 ▼0.0236.98 ▼4.3334.08 ▼1.53
Add New Post /wp-admin/post-new.php1,550 ▲3023.32 ▲0.34647.60 ▲31.8956.16 ▲3.95
Media Library /wp-admin/upload.php1,419 ▲284.24 ▲0.0495.18 ▼10.0942.97 ▲0.18
LR Services /wp-admin/edit.php?post_type=lrservice1,0992.0032.2530.56
Add New /wp-admin/post-new.php?post_type=lrservice4,9647.78175.1683.32
Settings /wp-admin/edit.php?post_type=lrservice&page=lr-service-setting-page9292.0532.4430.32
LR Free Plugins /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins9702.0328.3726.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded

Smoke tests 0% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
  • 12 occurences, only the last one shown
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-service-setting-page
    • > Notice in wp-content/plugins/lr-services/lr-service.php+749
    Trying to access array offset on value of type bool

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
Almost there! Just fix the following items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/lr-services/lr-free-plugins.php
  • 15× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 43
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 46
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 58
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 28
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 25
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/lr-services/includes/lr-service-style.php:2
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 52
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 31
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 37
    • > PHP Warning
      Use of undefined constant lr_service_plugin_url - assumed 'lr_service_plugin_url' (this will throw an Error in a future version of PHP) in wp-content/plugins/lr-services/lr-free-plugins.php on line 40

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There are user-side issues you should fix
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/feedback.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/gallery.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/slide-menu.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/team.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/new.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/testimonials.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/toggle-bar.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/you-tube.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/insta.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/faq.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/services.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/popup.png - Failed to load resource: the server responded with a status of 404 (Not Found)
    • > GET request to /wp-admin/edit.php?post_type=lrservice&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/lr-services/assets/recent-post.png - Failed to load resource: the server responded with a status of 404 (Not Found)

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed:
  • Donate link: Invalid URI found ("")
  • Stable tag: Not defined
You can take inspiration from this readme.txt

lr-services/lr-service.php 92% from 13 tests

"LR Services" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("lr-services.php" instead of "lr-service.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
Everything looks great! No dangerous files found in this plugin1,667 lines of code in 11 files:
LanguageFilesBlank linesComment linesLines of code
PHP3207874
SVG100504
CSS608287
JavaScript1052

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.15
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%
Functions21
▷ Named functions21100.00%
▷ Anonymous functions00.00%
Constants2
▷ Global constants2100.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
4 PNG files occupy 0.06MB with 0.03MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/3.png15.38KB8.48KB▼ 44.84%
images/4.png11.26KB6.45KB▼ 42.69%
images/1.png18.79KB9.37KB▼ 50.14%
images/2.png17.69KB9.80KB▼ 44.59%