10% links2tabs

Code Review | Links2Tabs

WordPress plugin Links2Tabs scored10%from 54 tests.

About plugin

  • Plugin page: links2tabs
  • Plugin version: 0.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 2.8-3.2
  • WordPress version: 6.3.1
  • First release: Jul 6, 2011
  • Latest release: Jun 12, 2013
  • Number of updates: 16
  • Update frequency: every 44.2 days
  • Top authors: Name.ly (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,660 total downloads

Benchmarks

Plugin footprint 58% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
It is recommended to fix the following installer errors
  • Install procedure validation failed for this plugin
    • > Error in wp-includes/ms-blogs.php+224
    Uncaught Error: Class 'WP_Site' not found in wp-includes/ms-blogs.php:224
    Stack trace:
    #0 wp-content/plugins/links2tabs/links2tabs.php(73): get_blog_details()
    #1 wp-admin/includes/plugin.php(2318): include_once('/var/www/wordpr...')
    #2 wp-admin/includes/plugin.php(663): plugin_sandbox_scrape()

Server metrics [RAM: ▲0.00MB] [CPU: ▼6.46ms] Passed 4 tests

A check of server-side resources used by Links2Tabs
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.07 ▼4.44
Dashboard /wp-admin3.31 ▲0.0048.66 ▼2.64
Posts /wp-admin/edit.php3.36 ▲0.0053.86 ▼2.29
Add New Post /wp-admin/post-new.php5.89 ▲0.0087.21 ▼16.40
Media Library /wp-admin/upload.php3.23 ▲0.0034.99 ▼2.36

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

Analyzing filesystem and database footprints of this plugin
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
theysaidso_admin_options
widget_recent-posts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Links2Tabs
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.34 ▼0.021.95 ▲0.0852.66 ▲9.94
Dashboard /wp-admin2,195 ▲185.62 ▼0.0589.72 ▼0.0040.88 ▼2.22
Posts /wp-admin/edit.php2,103 ▲31.94 ▼0.0152.98 ▲11.3038.77 ▲3.15
Add New Post /wp-admin/post-new.php1,526 ▼023.20 ▼0.43673.73 ▲37.1556.06 ▲2.23
Media Library /wp-admin/upload.php1,397 ▼04.16 ▼0.0397.56 ▼11.5745.27 ▲1.32

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

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

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
  • 4× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/links2tabs/links2tabs.php on line 68
    • > PHP Notice
      Undefined variable: number_of_bases in wp-content/plugins/links2tabs/links2tabs.php on line 77
    • > PHP Fatal error
      Uncaught Error: Call to undefined function __() in wp-content/plugins/links2tabs/links2tabs.php:98
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/links2tabs/links2tabs_settings_page.php:4

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 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 need to be fixed:
  • Screenshots: Screenshot #1 (All references opened with one click) image required
You can take inspiration from this readme.txt

links2tabs/links2tabs.php 92% from 13 tests

The entry point to "Links2Tabs" version 0.0.6 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: Keep the plugin description shorter than 140 characters (currently 542 characters long)

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
No dangerous file extensions were detected794 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP3134104775
HTML14019

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants8
▷ Global constants8100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
3 PNG files occupy 0.58MB with 0.36MB in potential savings
Potential savings
Compression of 3 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png88.16KB44.45KB▼ 49.58%
screenshot-3.png363.42KB107.33KB▼ 70.47%
screenshot-2.png139.93KB48.78KB▼ 65.14%