84% gp-additional-links

Code Review | GP Additional Links

WordPress plugin GP Additional Links scored84%from 54 tests.

About plugin

  • Plugin page: gp-additional-links
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.4-6.2
  • WordPress version: 6.3.1
  • First release: Dec 15, 2015
  • Latest release: Apr 17, 2023
  • Number of updates: 25
  • Update frequency: every 107.2 days
  • Top authors: GregRoss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,368 total downloads

Benchmarks

Plugin footprint 83% 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.01MB] [CPU: ▼0.90ms] Passed 4 tests

This is a short check of server-side resources used by GP Additional Links
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0139.43 ▼0.80
Dashboard /wp-admin3.31 ▲0.0145.06 ▼1.16
Posts /wp-admin/edit.php3.36 ▲0.0150.59 ▲6.92
Add New Post /wp-admin/post-new.php5.89 ▲0.0184.55 ▼5.77
Media Library /wp-admin/upload.php3.24 ▲0.0136.99 ▲4.14

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
db_upgraded
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for GP Additional Links
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲4313.21 ▼1.201.78 ▼0.2743.37 ▼4.17
Dashboard /wp-admin2,203 ▲175.81 ▲0.8999.83 ▼19.9940.36 ▼5.02
Posts /wp-admin/edit.php2,092 ▲31.99 ▼0.0640.63 ▲7.3035.26 ▼1.55
Add New Post /wp-admin/post-new.php1,514 ▼317.82 ▲0.28679.18 ▲17.2457.11 ▲4.32
Media Library /wp-admin/upload.php1,388 ▼04.18 ▼0.1195.50 ▼11.5941.29 ▼4.98

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • can_compress_scripts
    • 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 short smoke test looking for server-side errors
Even though everything seems fine, this is not an exhaustive test

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
Almost there! Just 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 add_action() in wp-content/plugins/gp-additional-links/gp-additional-links.php:59

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 Passed 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
2 plugin tags: translation, glotpress

gp-additional-links/gp-additional-links.php Passed 13 tests

The entry point to "GP Additional Links" version 1.0 is a PHP file that has certain tags in its header comment area
77 characters long description:
Add additional links to the GlotPress side menu and the WordPress admin menu.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin32 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1161832

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.23
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.75
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
GlotPress-Logo-20px.png0.92KB0.86KB▼ 6.56%