79% post-useful

Code Review | Post Useful

WordPress plugin Post Useful scored 79% from 54 tests.

About plugin

  • Plugin page: post-useful
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.8-4.5.3
  • WordPress version: 6.3.1
  • First release: Apr 10, 2015
  • Latest release: Aug 1, 2016
  • Number of updates: 4
  • Update frequency: every 119.8 days
  • Top authors: leobaiano (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 983 total downloads

Benchmarks

Plugin footprint 65% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼3.43ms] Passed 4 tests

An overview of server-side resources used by Post Useful
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0240.81 ▼7.15
Dashboard /wp-admin3.32 ▲0.0145.62 ▼4.49
Posts /wp-admin/edit.php3.37 ▲0.0149.56 ▲2.64
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.39 ▼0.96
Media Library /wp-admin/upload.php3.24 ▲0.0134.39 ▼1.10

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

A short overview of filesystem and database impact
This plugin installed successfully
Filesystem: 16 new files
Database: 1 new table, 7 new options
New tables
wp_post_useful
New WordPress options
widget_theysaidso_widget
post_useful_db_version
db_upgraded
widget_recent-comments
can_compress_scripts
widget_recent-posts
theysaidso_admin_options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Post Useful
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲11513.55 ▼0.888.25 ▲6.1740.21 ▼3.83
Dashboard /wp-admin2,206 ▲184.88 ▼0.0297.25 ▼19.4339.20 ▼7.02
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0936.69 ▲0.8634.10 ▲0.45
Add New Post /wp-admin/post-new.php6,444 ▲4,90720.76 ▼2.45914.76 ▲237.2456.09 ▲3.75
Media Library /wp-admin/upload.php1,391 ▲34.18 ▼0.0293.64 ▼15.1646.21 ▼0.39

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
It is recommended to fix the following
  • The uninstall procedure failed, leaving 1 table in the database
    • wp_post_useful
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • widget_theysaidso_widget
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments
    • post_useful_db_version

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
No output text or server-side errors detected on direct access of PHP files

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 issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that need to be fixed:
  • Screenshots: Please add images for these screenshots: #1 (Box for the user to sort the content.), #2 (Once the user sorts the post.), #3 (Box displaying the post classifications on the edit page.)
Please take inspiration from this readme.txt

post-useful/post-useful.php 92% from 13 tests

"Post Useful" version 1.0.1's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
There were no executable files found in this plugin320 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP356119167
CSS14158
Markdown121044
PO File15529
JavaScript11122

PHP code Passed 2 tests

A short review 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.10
Average class complexity4.50
▷ Minimum class complexity4.00
▷ Maximum class complexity5.00
Average method complexity1.50
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods14
▷ Static methods428.57%
▷ Public methods1392.86%
▷ Protected methods00.00%
▷ Private methods17.14%
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
7 PNG files occupy 0.30MB with 0.18MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/images/yes_hover.png16.03KB1.27KB▼ 92.05%
assets/images/no.png0.74KB0.70KB▼ 5.05%
screenshot-1.png124.98KB44.06KB▼ 64.75%
assets/images/no_hover.png16.05KB1.28KB▼ 92.05%
screenshot-3.png4.84KB2.54KB▼ 47.62%