84% yourls-link-creator-bulk-generate

Code Review | Yourls Link Creator Bulk Generate

WordPress plugin Yourls Link Creator Bulk Generate scored84%from 54 tests.

About plugin

  • Plugin page: yourls-link-creat...
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.0-3.6.0
  • WordPress version: 6.3.1
  • First release: May 1, 2015
  • Latest release: May 1, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: dustyf (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,131 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼15.15ms] Passed 4 tests

Analyzing server-side resources used by Yourls Link Creator Bulk Generate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0447.15 ▲0.19
Dashboard /wp-admin3.36 ▲0.0152.22 ▼14.68
Posts /wp-admin/edit.php3.47 ▲0.1149.63 ▼7.66
Add New Post /wp-admin/post-new.php5.94 ▲0.05104.41 ▼36.66
Media Library /wp-admin/upload.php3.28 ▲0.0438.56 ▼1.60
Yourls Bulk Generate /wp-admin/tools.php?page=yourls-link-creator-bulk-generate3.2434.82

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

A short overview of filesystem and database impact
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Yourls Link Creator Bulk Generate
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.22 ▲0.011.93 ▼0.1446.80 ▲0.82
Dashboard /wp-admin2,202 ▲225.61 ▼0.0789.85 ▼6.2042.60 ▲1.67
Posts /wp-admin/edit.php2,104 ▲41.96 ▲0.0037.63 ▼3.4234.25 ▼5.16
Add New Post /wp-admin/post-new.php1,538 ▲1023.06 ▼0.14702.30 ▲8.1551.55 ▼6.44
Media Library /wp-admin/upload.php1,407 ▲74.13 ▼0.07102.04 ▼8.6147.85 ▼0.70
Yourls Bulk Generate /wp-admin/tools.php?page=yourls-link-creator-bulk-generate7662.0025.2227.07

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • db_upgraded
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_basename() in wp-content/plugins/yourls-link-creator-bulk-generate/yourls-link-creator-bulk-generate.php:68

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
Please fix the following attributes:
  • Tags: No valid plugin tags found
You can take inspiration from this readme.txt

yourls-link-creator-bulk-generate/yourls-link-creator-bulk-generate.php 92% from 13 tests

This is the main PHP file of "Yourls Link Creator Bulk Generate" version 1.0.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
Please take the time to fix the following:
  • Domain Path: The domain path is invalid: folder "/languages" does not exist

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
Success! There were no dangerous files found in this plugin211 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP157114182
Markdown311029

PHP code Passed 2 tests

A brief analysis of cyclomatic complexity and code structure for this plugin
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity23.00
▷ Minimum class complexity23.00
▷ Maximum class complexity23.00
Average method complexity2.38
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods16
▷ Static methods16.25%
▷ Public methods1381.25%
▷ Protected methods16.25%
▷ Private methods212.50%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
PNG images were not found in this plugin