79% current-post

Code Review | Current Post

WordPress plugin Current Post scored 79% from 54 tests.

About plugin

  • Plugin page: current-post
  • Plugin version: 1.0.39
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.1.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2021
  • Latest release: Feb 12, 2023
  • Number of updates: 43
  • Update frequency: every 17.5 days
  • Top authors: basitadhi (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active / 1,776 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▲0.23MB] [CPU: ▼2.95ms] Passed 4 tests

An overview of server-side resources used by Current Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.70 ▲0.2346.13 ▲0.52
Dashboard /wp-admin3.54 ▲0.2354.98 ▼5.10
Posts /wp-admin/edit.php3.65 ▲0.2950.38 ▼2.86
Add New Post /wp-admin/post-new.php6.12 ▲0.23101.17 ▲2.03
Media Library /wp-admin/upload.php3.46 ▲0.2335.76 ▼4.35

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
widget_recent-posts
db_upgraded
can_compress_scripts

Browser metrics Passed 4 tests

A check of browser resources used by Current Post
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,825 ▼013.27 ▲0.024.52 ▲2.3243.15 ▼3.40
Dashboard /wp-admin2,222 ▲164.86 ▼0.01107.12 ▲5.8941.81 ▲2.54
Posts /wp-admin/edit.php2,105 ▲132.16 ▲0.1044.49 ▲9.2234.48 ▲1.42
Add New Post /wp-admin/post-new.php1,550 ▲1323.44 ▲5.02652.86 ▲36.0863.65 ▲9.22
Media Library /wp-admin/upload.php1,401 ▲134.12 ▼0.0495.87 ▼18.3942.19 ▼2.17

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • can_compress_scripts
    • db_upgraded

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/current-post/includes/current-post-adminmenu.php
  • 3× 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/current-post/includes/current-post-functions.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/current-post/includes/current-post-adminmenu.php:105
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/current-post/current-post.php:10

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser errors were detected

Optimizations

Plugin configuration Passed 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
8 plugin tags: author, shortcode, current, currentpost, toc...

current-post/current-post.php Passed 13 tests

Analyzing the main PHP file in "Current Post" version 1.0.39
56 characters long description:
This is a shortcode to display current post information.

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
Everything looks great! No dangerous files found in this plugin812 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP358162812

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.52
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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
PNG images were not found in this plugin