84% categorize-pages

Code Review | Categorize Pages

WordPress plugin Categorize Pages scored84%from 54 tests.

About plugin

  • Plugin page: categorize-pages
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-6.0
  • WordPress version: 6.3.1
  • First release: Jul 2, 2022
  • Latest release: Jul 2, 2022
  • Number of updates: 4
  • Update frequency: every 1.0 days
  • Top authors: BjornW (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /248 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
The plugin installed successfully, without throwing any errors or notices

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

Server-side resources used by Categorize Pages
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.06 ▼1.50
Dashboard /wp-admin3.31 ▲0.0148.21 ▼2.29
Posts /wp-admin/edit.php3.36 ▲0.0050.49 ▼3.30
Add New Post /wp-admin/post-new.php5.90 ▲0.0190.83 ▼8.82
Media Library /wp-admin/upload.php3.23 ▲0.0038.04 ▲0.12
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page3.2240.04

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
db_upgraded
widget_recent-posts
category_children
can_compress_scripts
widget_theysaidso_widget
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for Categorize Pages
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.35 ▼0.271.77 ▲0.1744.10 ▼0.52
Dashboard /wp-admin2,202 ▲225.60 ▲0.0787.42 ▼4.0541.11 ▼1.57
Posts /wp-admin/edit.php2,107 ▲72.02 ▲0.0037.13 ▼2.3931.90 ▼8.96
Add New Post /wp-admin/post-new.php1,529 ▲122.88 ▼0.26668.75 ▼34.3259.92 ▼0.13
Media Library /wp-admin/upload.php1,398 ▲14.17 ▲0.0797.33 ▼7.6142.61 ▼0.10
Categories /wp-admin/edit-tags.php?taxonomy=category&post_type=page1,4562.1228.0832.57

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
The following items require your attention
  • This plugin does not fully uninstall, leaving 7 options in the database
    • category_children
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 75% from 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 50% from 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
Please take a closer look at the following
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/categorize-pages/categorize-pages.php:40

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
No browser issues were found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
These attributes need to be fixed:
  • Screenshots: These screenshots require images: #1 (A screenshot of the WordPress backend Pages section with the added Categories marked red (arrow).), #2 (A screenshot of the WordPress backend. A Page with the added categories attributes marked red (arrow).)
You can look at the official readme.txt

categorize-pages/categorize-pages.php Passed 13 tests

The entry point to "Categorize Pages" version 1.0.0 is a PHP file that has certain tags in its header comment area
56 characters long description:
Add categories to Pages, just as you would do with Posts

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short check of programming languages and file extensions; no executable files are allowed
No dangerous file extensions were detected21 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP163317
Markdown1204

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code1.00
Average class complexity0.00
▷ Minimum class complexity0.00
▷ Maximum class complexity0.00
Average method complexity0.00
▷ Minimum method complexity0.00
▷ Maximum method complexity0.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes0
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
Methods0
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions2
▷ Named functions2100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.14MB with 0.09MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png50.94KB18.15KB▼ 64.38%
screenshot-1.png93.22KB32.58KB▼ 65.05%