74% compute-links

Code Review | Compute Links

WordPress plugin Compute Links scored74%from 54 tests.

About plugin

  • Plugin page: compute-links
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-6.0
  • WordPress version: 6.3.1
  • First release: Oct 4, 2019
  • Latest release: Sep 17, 2022
  • Number of updates: 9
  • Update frequency: every 121.6 days
  • Top authors: ndr053 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /561 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▼1.75ms] Passed 4 tests

Analyzing server-side resources used by Compute Links
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0439.64 ▼1.50
Dashboard /wp-admin3.35 ▲0.0453.99 ▲0.30
Posts /wp-admin/edit.php3.47 ▲0.1151.15 ▼0.96
Add New Post /wp-admin/post-new.php5.93 ▲0.0497.98 ▼4.82
Media Library /wp-admin/upload.php3.28 ▲0.0439.37 ▲1.76
Compute Links /wp-admin/options-general.php?page=compute_links3.2535.72

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 17 new files
Database: 1 new table, 7 new options
New tables
wp_clp_compute_links
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
my_db_version
can_compress_scripts
widget_theysaidso_widget

Browser metrics Passed 4 tests

A check of browser resources used by Compute Links
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲714.34 ▲0.051.81 ▼0.0944.70 ▲3.51
Dashboard /wp-admin2,202 ▲285.63 ▲0.0395.47 ▼9.1740.23 ▼5.67
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0039.68 ▼0.0234.98 ▼4.10
Add New Post /wp-admin/post-new.php1,529 ▲12123.08 ▲5.02703.14 ▲70.3152.54 ▲1.07
Media Library /wp-admin/upload.php1,398 ▲14.24 ▲0.01101.35 ▲1.1246.35 ▲1.91
Compute Links /wp-admin/options-general.php?page=compute_links8802.0032.8738.79

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie tables detected upon uninstall: 1 table
    • wp_clp_compute_links
  • This plugin does not fully uninstall, leaving 7 options in the database
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • my_db_version
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Good news, no errors were detected

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
  • 4× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Class 'Clp_Link' not found in wp-content/plugins/compute-links/admin/view/links.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_enqueue_style() in wp-content/plugins/compute-links/admin/view/index.php:1
    • > PHP Fatal error
      Uncaught Error: Class 'Clp_Link' not found in wp-content/plugins/compute-links/installer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/compute-links/admin/view/settings.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
3 plugin tags: compute links, display link size, total size links

compute-links/compute_links.php 92% from 13 tests

The entry point to "Compute Links" version 1.2.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Main file name: It is recommended to name the main PHP file as the plugin slug ("compute-links.php" instead of "compute_links.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
There were no executable files found in this plugin498 lines of code in 13 files:
LanguageFilesBlank linesComment linesLines of code
PHP11798421
CSS216077

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.36
Average class complexity3.00
▷ Minimum class complexity1.00
▷ Maximum class complexity8.00
Average method complexity1.52
▷ Minimum method complexity1.00
▷ Maximum method complexity8.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes6
▷ Abstract classes00.00%
▷ Concrete classes6100.00%
▷ Final classes00.00%
Methods23
▷ Static methods00.00%
▷ Public methods2295.65%
▷ Protected methods00.00%
▷ Private methods14.35%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
3 PNG files occupy 0.28MB with 0.17MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/screenshot-1.png134.06KB53.72KB▼ 59.93%
assets/screenshot-3.png50.08KB17.93KB▼ 64.19%
assets/screenshot-2.png106.15KB44.31KB▼ 58.26%