72% locicrays-wp-portfolio-gallery

Code Review | Locicrays Wp Portfolio & Gallery

WordPress plugin Locicrays Wp Portfolio & Gallery scored72%from 54 tests.

About plugin

  • Plugin page: locicrays-wp-port...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-5.6
  • WordPress version: 6.3.1
  • First release: Apr 9, 2018
  • Latest release: Jan 1, 2021
  • Number of updates: 4
  • Update frequency: every 249.8 days
  • Top authors: logicrays (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /651 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

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

This is a short check of server-side resources used by Locicrays Wp Portfolio & Gallery
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0443.61 ▼1.26
Dashboard /wp-admin3.35 ▲0.0553.22 ▼3.30
Posts /wp-admin/edit.php3.40 ▲0.0449.81 ▲0.86
Add New Post /wp-admin/post-new.php5.93 ▲0.0482.66 ▼23.35
Media Library /wp-admin/upload.php3.27 ▲0.0436.92 ▼3.10
LR Free Plugins /wp-admin/edit.php?post_type=lrportfolio&page=lr-free-plugins3.2733.87
Portfolio category /wp-admin/edit-tags.php?taxonomy=lrportfolio_category&post_type=lrportfolio3.2638.21
Add New /wp-admin/post-new.php?post_type=lrportfolio3.3951.53
LR Portfolios /wp-admin/edit.php?post_type=lrportfolio3.3140.09

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Locicrays Wp Portfolio & Gallery
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,866 ▲10514.20 ▼0.154.35 ▲2.5561.10 ▲17.94
Dashboard /wp-admin2,230 ▲535.59 ▲0.05103.98 ▲2.7541.99 ▼4.62
Posts /wp-admin/edit.php2,138 ▲381.95 ▼0.0740.08 ▲2.5539.46 ▲3.30
Add New Post /wp-admin/post-new.php1,555 ▲2923.34 ▼0.26668.07 ▼37.8453.27 ▼12.83
Media Library /wp-admin/upload.php1,438 ▲414.17 ▼0.0296.27 ▼13.7546.58 ▼1.82
LR Free Plugins /wp-admin/edit.php?post_type=lrportfolio&page=lr-free-plugins9711.9923.5229.63
Portfolio category /wp-admin/edit-tags.php?taxonomy=lrportfolio_category&post_type=lrportfolio1,3092.1227.2831.06
Add New /wp-admin/post-new.php?post_type=lrportfolio2,3547.73174.4064.26
LR Portfolios /wp-admin/edit.php?post_type=lrportfolio1,1211.9532.7234.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 25% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 1× GET requests to PHP files return non-empty strings:
    • > /wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php
  • 13× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 31
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 52
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-portfolio.php:10
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 49
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 25
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 55
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 28
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/locicrays-wp-portfolio-gallery/includes/lr-portfolio-shortcode.php:2
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 46
    • > PHP Warning
      Use of undefined constant LR_PORTFOLIO_URL - assumed 'LR_PORTFOLIO_URL' (this will throw an Error in a future version of PHP) in wp-content/plugins/locicrays-wp-portfolio-gallery/lr-free-plugins.php on line 43

User-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/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=lrportfolio&page=lr-free-plugins
    • > Network (severe)
    wp-content/plugins/locicrays-wp-portfolio-gallery/assets/services.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

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Invalid url: ""
  • Stable tag: No string
You can take inspiration from this readme.txt

locicrays-wp-portfolio-gallery/lr-portfolio.php 92% from 13 tests

The main PHP script in "Locicrays Wp Portfolio & Gallery" version 1.0 is automatically included on every request by WordPress
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("locicrays-wp-portfolio-gallery.php" instead of "lr-portfolio.php")

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,852 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
CSS31112,049
SVG100504
PHP32010286
JavaScript20713

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.13
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%
Functions13
▷ Named functions13100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected