89% wp-premium-posts

Code Review | WP Premium Posts

WordPress plugin WP Premium Posts scored89%from 54 tests.

About plugin

  • Plugin page: wp-premium-posts
  • Plugin version: 1.1.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-4.4
  • WordPress version: 6.3.1
  • First release: Dec 18, 2015
  • Latest release: Feb 10, 2016
  • Number of updates: 8
  • Update frequency: every 6.8 days
  • Top authors: Engr.MTH (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,256 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.03MB] [CPU: ▼6.05ms] Passed 4 tests

An overview of server-side resources used by WP Premium Posts
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0336.57 ▼10.27
Dashboard /wp-admin3.33 ▲0.0347.83 ▼1.60
Posts /wp-admin/edit.php3.38 ▲0.0345.30 ▼7.45
Add New Post /wp-admin/post-new.php5.91 ▲0.0391.58 ▲1.41
Media Library /wp-admin/upload.php3.25 ▲0.0331.53 ▼4.89

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

WP Premium Posts: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,816 ▲7013.25 ▼1.051.64 ▼0.6641.78 ▼2.53
Dashboard /wp-admin2,225 ▲374.86 ▼0.03111.06 ▼4.1139.57 ▼3.62
Posts /wp-admin/edit.php2,105 ▲162.05 ▲0.0139.45 ▲4.0434.27 ▼0.12
Add New Post /wp-admin/post-new.php1,535 ▲1523.36 ▲0.16598.45 ▼58.6450.03 ▼21.82
Media Library /wp-admin/upload.php1,398 ▲104.19 ▲0.0199.05 ▼1.8240.86 ▼4.29

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

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

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that require attention:
  • Tags: Too many tags (38 tag instead of maximum 10); only the first 5 tags are used in your directory listing
The official readme.txt might help

wp-premium-posts/wp-premium-posts.php 92% from 13 tests

The main file in "WP Premium Posts" v. 1.1.1 serves as a complement to information provided in readme.txt and as the entry point to the plugin
It is important to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected841 lines of code in 8 files:
LanguageFilesBlank linesComment linesLines of code
PHP514564675
JavaScript295147
CSS12019

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity29.50
▷ Minimum class complexity7.00
▷ Maximum class complexity52.00
Average method complexity5.38
▷ Minimum method complexity1.00
▷ Maximum method complexity22.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods13
▷ Static methods00.00%
▷ Public methods13100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions14
▷ Named functions14100.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
No PNG images were found in this plugin