10% post-publish-count

Code Review | post-publish-count

WordPress plugin post-publish-count scored10%from 54 tests.

About plugin

  • Plugin page: post-publish-count
  • Plugin version: 1.4
  • PHP version: 7.4.16
  • WordPress compatibility: 3.7-5.6
  • WordPress version: 6.3.1
  • First release: Jul 9, 2018
  • Latest release: Nov 29, 2020
  • Number of updates: 10
  • Update frequency: every 87.8 days
  • Top authors: yukinobu (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,102 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Please fix the following installer errors
  • Install procedure had errors
    • > Deprecated in wp-content/plugins/post-publish-count/post-publish-count.php+42
    Function create_function() is deprecated

Server metrics [RAM: ▼1.94MB] [CPU: ▼55.38ms] Passed 4 tests

A check of server-side resources used by post-publish-count
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.05 ▼1.424.82 ▼36.59
Dashboard /wp-admin2.07 ▼1.246.37 ▼47.56
Posts /wp-admin/edit.php2.07 ▼1.296.28 ▼41.91
Add New Post /wp-admin/post-new.php2.07 ▼3.825.60 ▼95.45
Media Library /wp-admin/upload.php2.07 ▼1.165.92 ▼31.44

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

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

Browser metrics Passed 4 tests

post-publish-count: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.34 ▼0.401.62 ▲0.0143.64 ▲1.72
Dashboard /wp-admin2,200 ▲265.63 ▲0.0491.75 ▲3.9649.40 ▲6.54
Posts /wp-admin/edit.php2,102 ▲21.98 ▼0.0539.81 ▲4.4842.64 ▲4.75
Add New Post /wp-admin/post-new.php1,598 ▲6221.65 ▲3.36604.31 ▼22.6057.05 ▼13.80
Media Library /wp-admin/upload.php1,405 ▲24.14 ▼0.0496.40 ▼1.5146.28 ▲3.54

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
You still need to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/post-publish-count/post-publish-count.php+42
    Function create_function() is deprecated
  • Zombie WordPress options detected upon uninstall: 7 options
    • widget_recent-posts
    • widget_publish_count_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

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
The smoke test was a success, however most plugin functionality was not tested

SRP 50% 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
Almost there! Just fix the following items
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-publish-count/post-publish-count.php:24

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 93% 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
These attributes need to be fixed:
  • Screenshots: Please add an image for screenshot #1 (Screenshot of when set as sidebar of wijet)
  • Donate link: Invalid URI found ("")
The official readme.txt might help

post-publish-count/post-publish-count.php Passed 13 tests

The principal PHP file in "post-publish-count" v. 1.4 is loaded by WordPress automatically on each request
78 characters long description:
WordPressの公開済みの投稿件数をカウントして表示します。

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
There were no executable files found in this plugin19 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP161819

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.00
Average class complexity1.00
▷ Minimum class complexity1.00
▷ Maximum class complexity1.00
Average method complexity1.00
▷ Minimum method complexity1.00
▷ Maximum method complexity1.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.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
1 PNG file occupies 0.05MB with 0.03MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png51.60KB16.62KB▼ 67.79%