84% autocatset

Code Review | AutoCatSet

WordPress plugin AutoCatSet scored84%from 54 tests.

About plugin

  • Plugin page: autocatset
  • Plugin version: 2.1.4
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0.0-6.3
  • WordPress version: 6.3.1
  • First release: Jul 7, 2020
  • Latest release: Oct 4, 2023
  • Number of updates: 42
  • Update frequency: every 28.2 days
  • Top authors: gyaku (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /710 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

Server metrics [RAM: ▼0.00MB] [CPU: ▼5.69ms] Passed 4 tests

Analyzing server-side resources used by AutoCatSet
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.74 ▲0.0140.53 ▼1.17
Dashboard /wp-admin3.58 ▼0.0554.85 ▼8.54
Posts /wp-admin/edit.php3.70 ▲0.0253.02 ▲0.06
Add New Post /wp-admin/post-new.php6.18 ▲0.0495.98 ▼13.10
Media Library /wp-admin/upload.php3.50 ▲0.0244.74 ▲5.83

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

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

Browser metrics Passed 4 tests

AutoCatSet: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,809 ▲4814.27 ▼0.291.65 ▼0.0839.23 ▲0.42
Dashboard /wp-admin2,215 ▲385.62 ▼0.0486.84 ▼8.3440.42 ▼1.90
Posts /wp-admin/edit.php2,123 ▲232.04 ▲0.0539.04 ▼0.9037.16 ▲1.18
Add New Post /wp-admin/post-new.php1,543 ▲1422.95 ▲5.24672.23 ▼40.7253.12 ▼11.44
Media Library /wp-admin/upload.php1,414 ▲174.28 ▲0.07110.16 ▲8.7145.93 ▼2.18

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% 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 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
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/autocatset/lib/recategorize.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/autocatset/lib/ajax.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_get_current_user() in wp-content/plugins/autocatset/lib/option_page.php:3

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

Don't ignore readme.txt as it is the file that instructs WordPress.org on how to present your plugin to the world
3 plugin tags: replace, category, automatic

autocatset/autocatset.php Passed 13 tests

The main PHP script in "AutoCatSet" version 2.1.4 is automatically included on every request by WordPress
109 characters long description:
AutoCatSet is plugin for automatically re-set category from keyword in the tile and the content of each post.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
Success! There were no dangerous files found in this plugin451 lines of code in 7 files:
LanguageFilesBlank linesComment linesLines of code
PHP55440333
JavaScript111366
CSS14152

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.38
Average class complexity3.00
▷ Minimum class complexity3.00
▷ Maximum class complexity3.00
Average method complexity1.67
▷ Minimum method complexity1.00
▷ Maximum method complexity3.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods3
▷ Static methods00.00%
▷ Public methods3100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There are no PNG files in this plugin