68% wp-history-post

Code Review | WP History Post

WordPress plugin WP History Post scored 68% from 54 tests.

About plugin

  • Plugin page: wp-history-post
  • Plugin version: 1.0.6
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-3.8
  • WordPress version: 5.8.1
  • First release: Feb 3, 2014
  • Latest release: Mar 5, 2014
  • Number of updates: 15
  • Update frequency: every 2.0 days
  • Top authors: eflyjason (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 611 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed successfully, without throwing any errors or notices

Server metrics [RAM: ▼1.61MB] [CPU: ▼192.08ms] Passed 4 tests

This is a short check of server-side resources used by WP History Post
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /2.02 ▼0.7010.18 ▼16.66
Dashboard /wp-admin2.04 ▼1.019.90 ▼36.16
Posts /wp-admin/edit.php2.04 ▼1.078.62 ▼40.67
Add New Post /wp-admin/post-new.php2.04 ▼3.3911.15 ▼662.06
Media Library /wp-admin/upload.php2.04 ▼0.9710.68 ▼29.43
WP History Post /wp-admin/options-general.php?page=wp-history-post-options2.0415.55

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

Analyzing filesystem and database footprints of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 11 new files
Database: no new tables, 3 new options
New WordPress options
wp_history_post_content_title
widget_wp_history_post_widget
wp_history_post_content_list

Browser metrics Passed 4 tests

An overview of browser requirements for WP History Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,708 ▲13615.87 ▲0.2511.22 ▼0.5849.65 ▲0.01
Dashboard /wp-admin2,972 ▲415.90 ▼0.06149.62 ▲7.20127.32 ▲13.36
Posts /wp-admin/edit.php2,741 ▲22.72 ▼0.0073.65 ▲1.12100.86 ▲1.27
Add New Post /wp-admin/post-new.php1,584 ▼9917.85 ▼0.91392.92 ▼34.58122.28 ▲3.24
Media Library /wp-admin/upload.php1,812 ▲55.00 ▼0.02165.45 ▲5.23130.79 ▼5.64
WP History Post /wp-admin/options-general.php?page=wp-history-post-options1,1092.0963.0091.93

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall without warnings or errors
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in wp_history_post_widget is deprecated since version 4.3.0! Use __construct() instead.
  • Zombie WordPress options were found after uninstall: 3 options
    • wp_history_post_content_title
    • widget_wp_history_post_widget
    • wp_history_post_content_list

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
These errors were triggered by the plugin
    • > GET request to /wp-admin/options-general.php?page=wp-history-post-options
    • > User deprecated in wp-includes/functions.php+5304
    The called constructor method for WP_Widget in wp_history_post_widget is deprecated since version 4.3.0! Use __construct() instead.
    • > GET request to /wp-admin/options-general.php?page=wp-history-post-options
    • > User deprecated in wp-includes/functions.php+5505
    add_option was called with an argument that is deprecated since version 2.3.0 with no alternative available.

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
Please take a closer look at the following
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_url() in wp-content/plugins/wp-history-post/wp-history-post.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/wp-history-post/options.php:8

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
2 plugin tags: post, history

wp-history-post/wp-history-post.php Passed 13 tests

The principal PHP file in "WP History Post" v. 1.0.6 is loaded by WordPress automatically on each request
95 characters long description:
Let visitors see your post in Today's History. 讓訪客看到歷史上的今天所寫的文章

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Success! There were no dangerous files found in this plugin273 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP23037175
PO File2262698

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.11
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity1.80
▷ 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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants3
▷ Global constants3100.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
PNG images were not found in this plugin