90% advance-user-post-crud

Code Review | Advance User Post CRUD

WordPress plugin Advance User Post CRUD scored 90% from 54 tests.

About plugin

  • Plugin page: advance-user-post...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 4.1-5.8
  • WordPress version: 6.3.1
  • First release: Jan 4, 2017
  • Latest release: Aug 4, 2021
  • Number of updates: 27
  • Update frequency: every 61.8 days
  • Top authors: krishaweb (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 2,734 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.06MB] [CPU: ▼1.39ms] Passed 4 tests

Server-side resources used by Advance User Post CRUD
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.52 ▲0.0638.60 ▼4.37
Dashboard /wp-admin3.36 ▲0.0647.57 ▼0.78
Posts /wp-admin/edit.php3.41 ▲0.0650.92 ▲2.34
Add New Post /wp-admin/post-new.php5.94 ▲0.0698.22 ▼2.10
Media Library /wp-admin/upload.php3.28 ▲0.0636.88 ▲1.70
/wp-admin/admin.php?page=adv-user-crud3.2530.64
Advance user post CRUD /wp-admin/options-general.php?page=adv-user-crud-post-count3.2534.28

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

A short overview of filesystem and database impact
This plugin was installed successfully
Filesystem: 10 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded
widget_theysaidso_widget

Browser metrics Passed 4 tests

Advance User Post CRUD: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,886 ▲15113.25 ▼1.041.86 ▼0.0329.05 ▼26.12
Dashboard /wp-admin2,284 ▲965.82 ▼0.05103.92 ▲6.0341.08 ▼2.05
Posts /wp-admin/edit.php2,092 ▼02.06 ▲0.0239.02 ▼2.6134.17 ▼4.09
Add New Post /wp-admin/post-new.php1,533 ▲1423.34 ▲0.27597.35 ▼72.3674.60 ▲22.18
Media Library /wp-admin/upload.php1,394 ▲34.20 ▼0.0096.16 ▼2.4942.02 ▼2.11
/wp-admin/admin.php?page=adv-user-crud7492.0222.9918.75
Advance user post CRUD /wp-admin/options-general.php?page=adv-user-crud-post-count7912.0523.5925.37

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP Passed 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
No output text or server-side errors detected on direct access of PHP files

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 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
4 plugin tags: count user posts, post type post count, published post, count user pages

advance-user-post-crud/custom-post-count.php 92% from 13 tests

The principal PHP file in "Advance User Post CRUD" v. 1.2 is loaded by WordPress automatically on each request
You should first fix the following items:
  • Main file name: Name the main plugin file the same as the plugin slug ("advance-user-post-crud.php" instead of "custom-post-count.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected385 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP539126294
CSS10091

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.22
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity2.50
▷ Minimum method complexity1.00
▷ Maximum method complexity9.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods12
▷ Static methods00.00%
▷ Public methods1191.67%
▷ Protected methods00.00%
▷ Private methods18.33%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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