84% add-link-post

Code Review | Add Link Post

WordPress plugin Add Link Post scored 84% from 54 tests.

About plugin

  • Plugin page: add-link-post
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-4.1
  • WordPress version: 5.9.2
  • First release: Feb 22, 2014
  • Latest release: Dec 26, 2014
  • Number of updates: 6
  • Update frequency: every 51.8 days
  • Top authors: narin1975 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

70+ active / 3,746 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.00MB] [CPU: ▼295.65ms] Passed 4 tests

An overview of server-side resources used by Add Link Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.57 ▲0.0263.78 ▲15.37
Dashboard /wp-admin3.46 ▲0.0231.65 ▼0.63
Posts /wp-admin/edit.php3.69 ▲0.0235.83 ▼2.34
Add New Post /wp-admin/post-new.php6.93 ▼0.0793.99 ▼1,177.83
Media Library /wp-admin/upload.php3.34 ▲0.0223.74 ▼1.81

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

How much does this plugin use your filesystem and database?
This plugin was installed successfully
Filesystem: 2 new files
Database: no new tables, 1 new option
New WordPress options
widget_add_link_post

Browser metrics Passed 4 tests

An overview of browser requirements for Add Link Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,763 ▲815.89 ▼0.076.78 ▲0.592.90 ▲0.31
Dashboard /wp-admin2,895 ▲416.00 ▼0.17116.44 ▼15.26157.58 ▼1.29
Posts /wp-admin/edit.php2,694 ▼03.24 ▲0.0165.15 ▲0.99143.08 ▼2.89
Add New Post /wp-admin/post-new.php1,661 ▼3716.57 ▼5.29389.95 ▼14.76153.06 ▼7.95
Media Library /wp-admin/upload.php1,698 ▼05.49 ▲0.01138.29 ▼14.04190.69 ▲2.78

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 1 option in the database
    • widget_add_link_post

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
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× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-link-post/add-link-post.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 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
9 plugin tags: post, news, url, publish, link...

add-link-post/add-link-post.php 92% from 13 tests

This is the main PHP file of "Add Link Post" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 155 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
Good job! No executable or dangerous file extensions detected45 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161045

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods2
▷ Static methods00.00%
▷ Public methods2100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG images were found in this plugin