93% add-newest-post-link-after-content

Code Review | Add newest post link after content

WordPress plugin Add newest post link after content scored 93% from 54 tests.

About plugin

  • Plugin page: add-newest-post-l...
  • Plugin version: 1.0
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-5.2
  • WordPress version: 5.9.2
  • First release: May 17, 2019
  • Latest release: May 17, 2019
  • Number of updates: 5
  • Update frequency: N/A
  • Top authors: abdobasha2004 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 345 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

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

Server metrics [RAM: ▼0.35MB] [CPU: ▼319.36ms] Passed 4 tests

An overview of server-side resources used by Add newest post link after content
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▼0.0444.81 ▼6.49
Dashboard /wp-admin3.41 ▲0.0132.53 ▼1.04
Posts /wp-admin/edit.php3.65 ▲0.0136.77 ▼2.38
Add New Post /wp-admin/post-new.php5.62 ▼1.3553.07 ▼1,267.54
Media Library /wp-admin/upload.php3.30 ▲0.0125.12 ▼0.82

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, no new options

Browser metrics Passed 4 tests

Checking browser requirements for Add newest post link after content
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,783 ▲4116.14 ▲0.576.45 ▲0.052.01 ▼0.49
Dashboard /wp-admin2,895 ▲376.15 ▼0.05126.80 ▼4.46164.41 ▼0.41
Posts /wp-admin/edit.php2,688 ▼63.24 ▲0.0064.64 ▲0.32135.81 ▼7.30
Add New Post /wp-admin/post-new.php1,711 ▼621.44 ▲0.33443.75 ▼43.57157.89 ▼1.09
Media Library /wp-admin/upload.php1,695 ▼35.54 ▲0.06139.34 ▼15.63191.38 ▼1.23

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The plugin uninstalled completely, with no zombie files or tables

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 no errors were found, this is by no means 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
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_filter() in wp-content/plugins/add-newest-post-link-after-content/Add-newest-post-link-after-content.php:30

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser errors were detected

Optimizations

Plugin configuration 90% from 29 tests

readme.txt 88% from 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
Attributes that need to be fixed: You can take inspiration from this readme.txt

add-newest-post-link-after-content/Add-newest-post-link-after-content.php 92% from 13 tests

The primary PHP file in "Add newest post link after content" version 1.0 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("add-newest-post-link-after-content.php" instead of "Add-newest-post-link-after-content.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
Success! There were no dangerous files found in this plugin21 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP11821

PHP code Passed 2 tests

This is a short overview of cyclomatic complexity and code structure for this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected