78% post-category-advanced

Code Review | Post Category Advanced

WordPress plugin Post Category Advanced scored78%from 54 tests.

About plugin

  • Plugin page: post-category-adv...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-6.0.3
  • WordPress version: 6.3.1
  • First release: Oct 20, 2022
  • Latest release: Oct 20, 2022
  • Number of updates: 3
  • Update frequency: N/A
  • Top authors: matteomontipo (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /190 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
Installer ran successfully

Server metrics [RAM: ▼0.62MB] [CPU: ▼15.85ms] Passed 4 tests

Analyzing server-side resources used by Post Category Advanced
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▲0.0744.08 ▲2.87
Dashboard /wp-admin3.37 ▲0.0751.74 ▼2.66
Posts /wp-admin/edit.php3.48 ▲0.1353.38 ▼2.97
Add New Post /wp-admin/post-new.php3.22 ▼2.6740.56 ▼60.63
Media Library /wp-admin/upload.php3.29 ▲0.0638.44 ▲3.44

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

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

Browser metrics Passed 4 tests

Post Category Advanced: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,905 ▲11913.41 ▼1.328.72 ▲6.9143.31 ▲0.69
Dashboard /wp-admin2,229 ▲525.57 ▼0.0990.76 ▲1.6942.78 ▲0.21
Posts /wp-admin/edit.php2,133 ▲332.04 ▲0.0239.84 ▼2.1534.39 ▼8.36
Add New Post /wp-admin/post-new.php1,540 ▲1423.55 ▲0.49683.19 ▼4.5450.62 ▼2.93
Media Library /wp-admin/upload.php1,437 ▲404.17 ▼0.04101.83 ▼4.3148.35 ▲1.66

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
The following items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
Everything seems fine, however this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files perform the action of outputting non-empty strings when accessed directly:
    • > /wp-content/plugins/post-category-advanced/public/partials/post-category-advanced-public-display.php
  • 2× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/post-category-advanced/admin/partials/post-category-advanced-admin-display.php:19
    • > PHP Warning
      Use of undefined constant PCADV_VERSION - assumed 'PCADV_VERSION' (this will throw an Error in a future version of PHP) in wp-content/plugins/post-category-advanced/admin/partials/post-category-advanced-admin-display.php on line 15

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Please fix the following attributes:
  • Plugin Name: You should set the name of your plugin on the first line ( === post-category-advanced === )
You can take inspiration from this readme.txt

post-category-advanced/post-category-advanced.php Passed 13 tests

Analyzing the main PHP file in "Post Category Advanced" version 1.0.1
64 characters long description:
Create relationships between post categories and tags, and more.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin681 lines of code in 17 files:
LanguageFilesBlank linesComment linesLines of code
PHP12171585543
CSS2109128
JavaScript23296
SVG1004

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.35
Average class complexity4.14
▷ Minimum class complexity1.00
▷ Maximum class complexity20.00
Average method complexity1.81
▷ Minimum method complexity1.00
▷ Maximum method complexity11.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes7
▷ Abstract classes00.00%
▷ Concrete classes7100.00%
▷ Final classes00.00%
Methods27
▷ Static methods27.41%
▷ Public methods2281.48%
▷ Protected methods00.00%
▷ Private methods518.52%
Functions3
▷ Named functions3100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
7 PNG files occupy 0.12MB with 0.07MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/banner-772x250.png17.34KB7.66KB▼ 55.84%
assets/banner-772x250-rtl.png17.34KB7.66KB▼ 55.84%
assets/icon-128x128.png1.96KB1.05KB▼ 46.46%
assets/banner-1544x500-rtl.png38.43KB16.05KB▼ 58.25%
images/all-wp-logo.png7.87KB3.42KB▼ 56.53%