79% lsx-testimonials

Code Review | LSX Testimonials

WordPress plugin LSX Testimonials scored 79% from 54 tests.

About plugin

  • Plugin page: lsx-testimonials
  • Plugin version: 1.3.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.3
  • WordPress version: 6.3.1
  • First release: Mar 24, 2018
  • Latest release: Aug 18, 2023
  • Number of updates: 33
  • Update frequency: every 59.8 days
  • Top authors: feedmymedia (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 3,147 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▲0.11MB] [CPU: ▼1.16ms] Passed 4 tests

A check of server-side resources used by LSX Testimonials
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1241.28 ▼2.91
Dashboard /wp-admin3.40 ▲0.1046.53 ▼4.16
Posts /wp-admin/edit.php3.45 ▲0.1050.09 ▲2.90
Add New Post /wp-admin/post-new.php6.11 ▲0.2289.62 ▼0.46
Media Library /wp-admin/upload.php3.33 ▲0.1038.16 ▲2.88
Add New /wp-admin/post-new.php?post_type=testimonial4.8244.81
Tags /wp-admin/edit-tags.php?taxonomy=testimonial_tag&post_type=testimonial3.3234.84
All Testimonials /wp-admin/edit.php?post_type=testimonial3.3738.81

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 56 new files
Database: no new tables, 8 new options
New WordPress options
widget_theysaidso_widget
LSX_Testimonials_Scporder_Install
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_lsx_testimonials_widget
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for LSX Testimonials
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,953 ▲21813.64 ▼0.655.72 ▲3.9135.77 ▼9.36
Dashboard /wp-admin2,241 ▲505.79 ▲0.9199.18 ▼11.4239.61 ▼4.30
Posts /wp-admin/edit.php2,138 ▲522.27 ▲0.2737.27 ▼2.4130.72 ▼5.89
Add New Post /wp-admin/post-new.php1,546 ▲1317.63 ▼5.71687.96 ▲44.7850.79 ▼7.69
Media Library /wp-admin/upload.php1,436 ▲484.25 ▼0.03101.62 ▲1.7744.17 ▼0.77
Add New /wp-admin/post-new.php?post_type=testimonial6,44224.05894.1631.35
Tags /wp-admin/edit-tags.php?taxonomy=testimonial_tag&post_type=testimonial1,3112.3530.0130.31
All Testimonials /wp-admin/edit.php?post_type=testimonial1,1332.4237.5328.21

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • The uninstall procedure has failed, leaving 8 options in the database
    • db_upgraded
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_lsx_testimonials_widget
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • LSX_Testimonials_Scporder_Install

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Notice in wp-content/plugins/lsx-testimonials/includes/functions.php+53
    Trying to get property 'id' of non-object
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=testimonial
    • > Notice in wp-content/plugins/lsx-testimonials/includes/functions.php+54
    Trying to access array offset on value of type bool

SRP 50% 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
Almost there! Just fix the following items
  • 14× PHP files trigger errors when accessed directly with GET requests (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/lsx-testimonials/classes/class-lsx-testimonials-widget.php:12
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/lsx-testimonials/templates/archive-testimonials.php:8
    • > PHP Warning
      require_once(LSX_TESTIMONIALS_PATHclasses/admin/class-settings.php): failed to open stream: No such file or directory in wp-content/plugins/lsx-testimonials/classes/class-lsx-testimonials-admin.php on line 35
    • > PHP Fatal error
      Uncaught Error: Class 'LSX_Schema_Graph_Piece' not found in wp-content/plugins/lsx-testimonials/classes/class-lsx-testimonials-schema.php:12
    • > PHP Fatal error
      Uncaught Error: Call to a member function get_thumbnail() on null in wp-content/plugins/lsx-testimonials/templates/content-archive-testimonials.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function testimonials_get_options() in wp-content/plugins/lsx-testimonials/classes/class-lsx-testimonials.php:18
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/lsx-testimonials/includes/functions.php:19
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/lsx-testimonials/includes/class-lsx-testimonials-scpo-engine.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/lsx-testimonials/templates/single-testimonials.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function testimonials_get_options() in wp-content/plugins/lsx-testimonials/classes/class-lsx-testimonials-frontend.php:14

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)
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
5 plugin tags: lsx, post type, gutenberg, carousel, testimonials

lsx-testimonials/lsx-testimonials.php Passed 13 tests

"LSX Testimonials" version 1.3.6's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
65 characters long description:
The LSX Testimonials extension adds the "Testimonials" post type.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Everything looks great! No dangerous files found in this plugin3,699 lines of code in 46 files:
LanguageFilesBlank linesComment linesLines of code
PHP153983891,792
Sass7178325882
CSS925311270
JavaScript850129223
YAML450185
PO File18082179
Markdown1840124
XML113944

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.33
Average class complexity23.88
▷ Minimum class complexity2.00
▷ Maximum class complexity56.00
Average method complexity3.82
▷ Minimum method complexity1.00
▷ Maximum method complexity30.00
Code structure
Namespaces1
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods65
▷ Static methods23.08%
▷ Public methods6498.46%
▷ Protected methods00.00%
▷ Private methods11.54%
Functions12
▷ Named functions12100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
1 PNG file occupies 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
assets/img/mystery-man-square.png2.46KB1.66KB▼ 32.70%