84% link-post-type

Code Review | Link Post Type

WordPress plugin Link Post Type scored84%from 54 tests.

About plugin

  • Plugin page: link-post-type
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.2.2
  • WordPress version: 6.3.1
  • First release: May 16, 2015
  • Latest release: May 16, 2015
  • Number of updates: 2
  • Update frequency: N/A
  • Top authors: tomi33 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,169 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼12.11ms] Passed 4 tests

A check of server-side resources used by Link Post Type
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0450.00 ▲7.53
Dashboard /wp-admin3.34 ▼0.0153.35 ▼16.39
Posts /wp-admin/edit.php3.39 ▲0.0350.80 ▼16.52
Add New Post /wp-admin/post-new.php5.93 ▲0.03103.57 ▼11.08
Media Library /wp-admin/upload.php3.26 ▲0.0335.41 ▼4.45
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=links3.2638.21
Add New /wp-admin/post-new.php?post_type=links3.3946.05
Links /wp-admin/edit.php?post_type=links3.3139.93

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_recent-posts
theysaidso_admin_options
widget_recent-comments
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

An overview of browser requirements for Link Post Type
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,823 ▲7714.38 ▲0.031.66 ▼0.1145.43 ▼6.57
Dashboard /wp-admin2,223 ▲485.61 ▲0.0285.92 ▼22.1040.99 ▼5.93
Posts /wp-admin/edit.php2,134 ▲311.98 ▼0.0541.57 ▼2.0836.12 ▼10.58
Add New Post /wp-admin/post-new.php1,554 ▲2823.20 ▲0.02633.36 ▼82.1260.01 ▲1.17
Media Library /wp-admin/upload.php1,434 ▲344.12 ▼0.04101.56 ▼14.0943.84 ▼7.48
Tags /wp-admin/edit-tags.php?taxonomy=post_tag&post_type=links1,3472.1228.4430.95
Add New /wp-admin/post-new.php?post_type=links2,2907.61192.6571.10
Links /wp-admin/edit.php?post_type=links1,1001.9732.7229.44

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments

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)
Good news, no errors were detected

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following
  • 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/link-post-type/link-post-type.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine on the user side

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
5 plugin tags: custom, post type, tagging, link, meta box

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

The principal PHP file in "Link Post Type" v. 0.1 is loaded by WordPress automatically on each request
27 characters long description:
Custom post types for links

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
No dangerous file extensions were detected51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1212351

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.18
Average class complexity4.00
▷ Minimum class complexity4.00
▷ Maximum class complexity4.00
Average method complexity1.60
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods5
▷ Static methods00.00%
▷ Public methods5100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
No PNG images were found in this plugin