84% add-post-link

Code Review | Add Post Link

WordPress plugin Add Post Link scored84%from 54 tests.

About plugin

  • Plugin page: add-post-link
  • Plugin version: 1.2.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.5
  • WordPress version: 6.3.1
  • First release: Jun 21, 2016
  • Latest release: Jun 21, 2016
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: beek.yoshida (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /819 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.07MB] [CPU: ▼5.47ms] Passed 4 tests

An overview of server-side resources used by Add Post Link
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0739.09 ▼0.31
Dashboard /wp-admin3.37 ▲0.0743.65 ▼5.76
Posts /wp-admin/edit.php3.48 ▲0.1345.20 ▼4.07
Add New Post /wp-admin/post-new.php5.95 ▲0.0779.79 ▼11.73
Media Library /wp-admin/upload.php3.29 ▲0.0737.59 ▲0.68
Add Post Link /wp-admin/plugins.php?page=add-post-link/add-post-link.php3.2630.06

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options
can_compress_scripts
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Add Post Link
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲3814.32 ▼0.031.48 ▼0.3838.79 ▼6.56
Dashboard /wp-admin2,204 ▲245.57 ▼0.0588.10 ▼3.7540.28 ▼2.04
Posts /wp-admin/edit.php2,109 ▲61.95 ▼0.0837.62 ▼0.9637.39 ▲2.33
Add New Post /wp-admin/post-new.php1,531 ▲322.93 ▲0.57617.60 ▼5.8558.96 ▼1.16
Media Library /wp-admin/upload.php1,409 ▲64.24 ▲0.17100.05 ▲2.4241.89 ▼2.59
Add Post Link /wp-admin/plugins.php?page=add-post-link/add-post-link.php9811.9922.3029.19

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Even though everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/add-post-link/add-post-link.php:30

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
No plugin tags provided

add-post-link/add-post-link.php Passed 13 tests

The main PHP file in "Add Post Link" ver. 1.2.0 adds more information about the plugin and also serves as the entry point for this plugin
39 characters long description:
Add shortcode any post link to content.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
No dangerous file extensions were detected421 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP13321208
Sass140135
CSS13178

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.28
Average class complexity43.00
▷ Minimum class complexity43.00
▷ Maximum class complexity43.00
Average method complexity3.33
▷ Minimum method complexity1.00
▷ Maximum method complexity21.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods18
▷ Static methods00.00%
▷ Public methods18100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.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
No PNG files were detected