84% laiser-tag

Code Review | Laiser Tag

WordPress plugin Laiser Tag scored84%from 54 tests.

About plugin

  • Plugin page: laiser-tag
  • Plugin version: 1.2.5
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.4
  • WordPress version: 6.3.1
  • First release: Aug 8, 2017
  • Latest release: Aug 7, 2020
  • Number of updates: 45
  • Update frequency: every 24.3 days
  • Top authors: pcis (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,618 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.12MB] [CPU: ▼9.26ms] Passed 4 tests

A check of server-side resources used by Laiser Tag
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.61 ▲0.1542.42 ▼0.67
Dashboard /wp-admin3.43 ▲0.0855.37 ▼12.53
Posts /wp-admin/edit.php3.54 ▲0.1952.18 ▼1.53
Add New Post /wp-admin/post-new.php6.01 ▲0.1294.00 ▼22.29
Media Library /wp-admin/upload.php3.35 ▲0.1240.28 ▲1.49

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 15 new files
Database: no new tables, 13 new options
New WordPress options
ltoc_disable_batch
can_compress_scripts
widget_recent-comments
ltoc_included_categories
ltoc_tag_blacklist
widget_recent-posts
widget_theysaidso_widget
ltoc_batch_posts
ltoc_api_key
ltoc_tag_relevance
...

Browser metrics Passed 4 tests

Checking browser requirements for Laiser Tag
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,815 ▲5414.51 ▲0.351.94 ▲0.2643.72 ▼1.81
Dashboard /wp-admin2,221 ▲535.62 ▲0.0288.69 ▼5.5242.31 ▼0.86
Posts /wp-admin/edit.php2,127 ▲271.97 ▼0.0638.22 ▼0.4634.35 ▼4.97
Add New Post /wp-admin/post-new.php1,549 ▲1423.32 ▲5.10656.74 ▲5.4650.02 ▼16.29
Media Library /wp-admin/upload.php1,423 ▲234.24 ▲0.0897.96 ▼3.7246.24 ▲2.86

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 13 options
    • db_upgraded
    • ltoc_tag_blacklist
    • ltoc_tag_relevance
    • widget_recent-posts
    • ltoc_api_key
    • ltoc_included_categories
    • can_compress_scripts
    • ltoc_add_tag_on_save
    • widget_recent-comments
    • widget_theysaidso_widget
    • ...

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 2× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function home_url() in wp-content/plugins/laiser-tag/templates/adminOptionPage.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/laiser-tag/templates/missingApiAdminNotice.php:2

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
5 plugin tags: content optimization, tagging, taxonomy, open calais, semantic data

laiser-tag/laisertag.php 92% from 13 tests

Analyzing the main PHP file in "Laiser Tag" version 1.2.5
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("laiser-tag.php" instead of "laisertag.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
Good job! No executable or dangerous file extensions detected1,271 lines of code in 10 files:
LanguageFilesBlank linesComment linesLines of code
PHP713687863
CSS15138300
JavaScript113973
SVG10135

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity22.00
▷ Minimum class complexity1.00
▷ Maximum class complexity71.00
Average method complexity3.90
▷ Minimum method complexity1.00
▷ Maximum method complexity20.00
Code structure
Namespaces3
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods29
▷ Static methods13.45%
▷ Public methods1862.07%
▷ Protected methods00.00%
▷ Private methods1137.93%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants9
▷ Global constants9100.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
3 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/calais-logo.png1.92KB0.62KB▼ 67.78%
assets/icon-128.png15.16KB5.53KB▼ 63.56%
assets/images/lt_logo.png7.25KB3.21KB▼ 55.66%