84% lcs-image-nolink

Code Review | LCS Image Nolink

WordPress plugin LCS Image Nolink scored84%from 54 tests.

About plugin

  • Plugin page: lcs-image-nolink
  • Plugin version: 1.3
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-5.2
  • WordPress version: 6.3.1
  • First release: Feb 16, 2016
  • Latest release: May 6, 2019
  • Number of updates: 12
  • Update frequency: every 97.9 days
  • Top authors: latcomsystems (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /918 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.01MB] [CPU: ▼1.37ms] Passed 4 tests

Server-side resources used by LCS Image Nolink
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.31 ▲0.8542.26 ▼3.50
Dashboard /wp-admin3.31 ▲0.0146.23 ▼0.08
Posts /wp-admin/edit.php3.36 ▲0.0046.51 ▲1.06
Add New Post /wp-admin/post-new.php5.89 ▲0.0193.55 ▼2.83
Media Library /wp-admin/upload.php3.23 ▲0.0036.99 ▲0.93

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 3 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
lcs_saved_image_default_link_type
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by LCS Image Nolink
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.75 ▼0.631.70 ▼0.4441.79 ▼2.92
Dashboard /wp-admin2,209 ▲215.85 ▼0.0196.76 ▼6.6740.33 ▲1.38
Posts /wp-admin/edit.php2,092 ▼01.99 ▼0.0039.49 ▲2.8134.82 ▲2.91
Add New Post /wp-admin/post-new.php1,524 ▲1023.17 ▲5.66644.44 ▼41.5075.24 ▲19.24
Media Library /wp-admin/upload.php1,385 ▼04.24 ▼0.02110.75 ▲0.7048.07 ▲2.76

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 detected upon uninstall: 7 options
    • can_compress_scripts
    • lcs_saved_image_default_link_type
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

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
Please take a closer look at the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/lcs-image-nolink/lcs_image_nolink.php:15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% 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 require attention:
  • Tags: Too many tags (12 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

lcs-image-nolink/lcs_image_nolink.php 92% from 13 tests

The entry point to "LCS Image Nolink" version 1.3 is a PHP file that has certain tags in its header comment area
The following require your attention:
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("lcs-image-nolink.php" instead of "lcs_image_nolink.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Success! There were no dangerous files found in this plugin1,323 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP22052681,323

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.50
Average class complexity163.50
▷ Minimum class complexity130.00
▷ Maximum class complexity197.00
Average method complexity4.82
▷ Minimum method complexity1.00
▷ Maximum method complexity57.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods85
▷ Static methods11.18%
▷ Public methods6981.18%
▷ Protected methods1618.82%
▷ Private methods00.00%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants21
▷ Global constants21100.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
No PNG files were detected