84% waj-links

Code Review | WAJ Links

WordPress plugin WAJ Links scored84%from 54 tests.

About plugin

  • Plugin page: waj-links
  • Plugin version: 1.3.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.8-5.2
  • WordPress version: 6.3.1
  • First release: Nov 12, 2018
  • Latest release: May 9, 2019
  • Number of updates: 10
  • Update frequency: every 18.1 days
  • Top authors: waughjai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /768 total downloads

Benchmarks

Plugin footprint 82% 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.10MB] [CPU: ▼7.24ms] Passed 4 tests

This is a short check of server-side resources used by WAJ Links
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.1142.93 ▼1.64
Dashboard /wp-admin3.41 ▲0.1054.49 ▲5.87
Posts /wp-admin/edit.php3.52 ▲0.1650.51 ▼26.85
Add New Post /wp-admin/post-new.php5.99 ▲0.1088.06 ▼3.09
Media Library /wp-admin/upload.php3.33 ▲0.1038.57 ▲2.62

Server storage [IO: ▲0.57MB] [DB: ▲0.00MB] 67% from 3 tests

Filesystem and database footprint
Please try to fix the following items
  • There were 1 file (4.00KB) illegally modified outside of "wp-content/plugins/waj-links/" and "wp-content/uploads/"
    • (new file) wp-content/mgd_mirror/mgd_maximinodotpy-gitdown-test-repository
Filesystem: 191 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
widget_theysaidso_widget
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for WAJ Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲5413.64 ▼0.732.42 ▲0.3845.31 ▲6.42
Dashboard /wp-admin2,221 ▲185.81 ▲0.92100.67 ▼9.6538.52 ▼3.65
Posts /wp-admin/edit.php2,100 ▲31.98 ▼0.0235.18 ▼2.8434.34 ▼2.97
Add New Post /wp-admin/post-new.php1,532 ▼223.12 ▼0.00690.97 ▲47.0763.80 ▼2.29
Media Library /wp-admin/upload.php1,394 ▼94.20 ▲0.0098.36 ▼9.4548.79 ▲0.80

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget

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)
Everything seems fine, however this is by no means an exhaustive test

SRP 50% 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
  • 33× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\RequestInterface' not found in wp-content/plugins/waj-links/vendor/psr/http-message/src/ServerRequestInterface.php:43
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\MessageInterface' not found in wp-content/plugins/waj-links/vendor/psr/http-message/src/ResponseInterface.php:20
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\VerifiedArguments\\VerifiedArguments' not found in wp-content/plugins/waj-links/vendor/waughj/verified-arguments-same-type/src/VerifiedArgumentsSameType.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-links/vendor/waughj/html-attribute-list/tests/HTMLAttributeListTest.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\HTMLLink\\HTMLLink' not found in wp-content/plugins/waj-links/vendor/waughj/wp-post-link/src/WPPostLink.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-links/vendor/waughj/html-link/tests/HTMLLinkTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\HTMLLink\\HTMLLink' not found in wp-content/plugins/waj-links/vendor/waughj/wp-category-link/src/WPCategoryLink.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-links/vendor/waughj/verified-arguments-same-type/tests/VerifiedArgumentsSameTypeTest.php:6
    • > PHP Fatal error
      Uncaught Error: Class 'WaughJ\\HTMLLink\\HTMLLink' not found in wp-content/plugins/waj-links/vendor/waughj/wp-media-link/src/WPMediaLink.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/waj-links/vendor/waughj/html-mail-link/tests/HTMLMailLinkTest.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: link, auto-generate, html

waj-links/waj-links.php Passed 13 tests

The entry point to "WAJ Links" version 1.3.0 is a PHP file that has certain tags in its header comment area
74 characters long description:
Simple plugin for easy generation o' link HTML for various types o' links.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Good job! No executable or dangerous file extensions detected5,403 lines of code in 117 files:
LanguageFilesBlank linesComment linesLines of code
PHP646271,3053,299
JSON23001,600
Markdown272470487
XML10012
YAML2205

PHP code Passed 2 tests

A brief analysis 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.19
Average class complexity4.50
▷ Minimum class complexity1.00
▷ Maximum class complexity44.00
Average method complexity1.68
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces25
Interfaces7
Traits1
Classes44
▷ Abstract classes00.00%
▷ Concrete classes44100.00%
▷ Final classes00.00%
Methods338
▷ Static methods277.99%
▷ Public methods30991.42%
▷ Protected methods10.30%
▷ Private methods288.28%
Functions67
▷ Named functions4871.64%
▷ Anonymous functions1928.36%
Constants17
▷ Global constants00.00%
▷ Class constants17100.00%
▷ Public constants17100.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
4 compressed PNG files occupy 0.00MB
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
(invalid) vendor/waughj/html-image/tests/demo-800x500.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/html-image/tests/demo.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/wp-upload-image/2018/12/demo.png0.00KB0.00KB0.00%
(invalid) vendor/waughj/html-image/tests/demo-300x300.png0.00KB0.00KB0.00%