79% lt-unleashed

Code Review | LT Unleashed

WordPress plugin LT Unleashed scored79%from 54 tests.

About plugin

  • Plugin page: lt-unleashed
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Oct 14, 2015
  • Latest release: May 18, 2018
  • Number of updates: 17
  • Update frequency: every 55.8 days
  • Top authors: cvedovini (100%)

Code review

54 tests

User reviews

2 reviews

Install metrics

40+ active /1,933 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼14.40ms] Passed 4 tests

This is a short check of server-side resources used by LT Unleashed
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0340.98 ▼11.22
Dashboard /wp-admin3.34 ▼0.0048.41 ▼19.25
Posts /wp-admin/edit.php3.39 ▲0.0446.68 ▼3.66
Add New Post /wp-admin/post-new.php5.92 ▲0.0485.60 ▼23.47
Media Library /wp-admin/upload.php3.27 ▲0.0436.99 ▲0.04
LibraryThing /wp-admin/options-general.php?page=libarything-unleashed-options3.2432.82

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 48 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
db_upgraded
widget_librarything-unleashed
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by LT Unleashed
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,795 ▲3414.70 ▲0.352.10 ▲0.3146.01 ▲1.34
Dashboard /wp-admin2,202 ▲285.65 ▲0.1284.36 ▼15.5839.65 ▼6.14
Posts /wp-admin/edit.php2,104 ▲42.02 ▼0.0133.91 ▼10.0735.82 ▼3.07
Add New Post /wp-admin/post-new.php1,539 ▲218.36 ▲0.08622.74 ▼19.0385.38 ▲9.21
Media Library /wp-admin/upload.php1,404 ▲44.17 ▼0.11102.34 ▼0.8742.44 ▼1.63
LibraryThing /wp-admin/options-general.php?page=libarything-unleashed-options9402.0325.6434.99

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
These items require your attention
  • Zombie WordPress options were found after uninstall: 7 options
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget
    • widget_librarything-unleashed

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means 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
Almost there! Just fix the following items
  • 2× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/lt-unleashed/templates/list.php
    • > /wp-content/plugins/lt-unleashed/templates/covers.php
  • 22× PHP files trigger server-side errors or warnings when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'ApaiIO\\ResponseTransformer\\ResponseTransformerInterface' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/ResponseTransformer/XmlToSimpleXmlObject.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'ApaiIO\\Operations\\AbstractOperation' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/Operations/CartClear.php:26
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/lt-unleashed/lt-unleashed.php:28
    • > PHP Fatal error
      Uncaught Error: Class 'ApaiIO\\Operations\\AbstractOperation' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/Operations/SimilarityLookup.php:26
    • > PHP Warning
      Invalid argument supplied for foreach() in wp-content/plugins/lt-unleashed/templates/list.php on line 2
    • > PHP Fatal error
      Uncaught Error: Class 'ApaiIO\\Operations\\AbstractOperation' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/Operations/CartCreate.php:26
    • > PHP Fatal error
      Uncaught Error: Interface 'ApaiIO\\Request\\RequestInterface' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/Request/Soap/Request.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'ApaiIO\\ResponseTransformer\\ResponseTransformerInterface' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/ResponseTransformer/ObjectToArray.php:25
    • > PHP Fatal error
      Uncaught Error: Interface 'ApaiIO\\ResponseTransformer\\ResponseTransformerInterface' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/ResponseTransformer/Xslt.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'ApaiIO\\Operations\\AbstractOperation' not found in wp-content/plugins/lt-unleashed/includes/ApaiIO/Operations/BrowseNodeLookup.php:26

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: widget, shortcode, book, librarything

lt-unleashed/lt-unleashed.php Passed 13 tests

The main PHP script in "LT Unleashed" version 1.1.1 is automatically included on every request by WordPress
94 characters long description:
Offers shortcodes and widgets to display any public LibraryThing books collection in WordPress

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin1,768 lines of code in 35 files:
LanguageFilesBlank linesComment linesLines of code
PHP333991,1741,575
CSS1440187
JavaScript1106

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.21
Average class complexity4.23
▷ Minimum class complexity1.00
▷ Maximum class complexity23.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces8
Interfaces4
Traits1
Classes25
▷ Abstract classes14.00%
▷ Concrete classes2496.00%
▷ Final classes14.17%
Methods143
▷ Static methods96.29%
▷ Public methods12688.11%
▷ Protected methods139.09%
▷ Private methods42.80%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants14
▷ Global constants428.57%
▷ Class constants1071.43%
▷ Public constants10100.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
8 PNG files occupy 0.01MB with 0.00MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/icons/google.png0.67KB0.60KB▼ 9.54%
images/stars.png0.57KB0.50KB▼ 12.07%
images/librarything1.png0.28KB0.18KB▼ 34.04%
images/icons/book_add.png0.70KB0.95KB0.00%
images/icons/librarything.png0.30KB0.18KB▼ 38.16%