84% create-categories-for-pages-only

Code Review | Create Categories For Pages Only

WordPress plugin Create Categories For Pages Only scored84%from 54 tests.

About plugin

  • Plugin page: create-categories...
  • Plugin version: 1.0
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-5.1.1
  • WordPress version: 6.3.1
  • First release: May 10, 2019
  • Latest release: May 10, 2019
  • Number of updates: 7
  • Update frequency: every 0.3 days
  • Top authors: ThePilot (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /664 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.01MB] [CPU: ▼8.91ms] Passed 4 tests

An overview of server-side resources used by Create Categories For Pages Only
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0341.15 ▼1.67
Dashboard /wp-admin3.32 ▼0.0249.52 ▼25.26
Posts /wp-admin/edit.php3.38 ▲0.0249.38 ▼3.07
Add New Post /wp-admin/post-new.php5.94 ▲0.0698.90 ▼5.64
Media Library /wp-admin/upload.php3.25 ▲0.0237.50 ▲3.10
Page categories /wp-admin/edit-tags.php?taxonomy=pagecategories&post_type=page3.2435.13

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded

Browser metrics Passed 4 tests

Create Categories For Pages Only: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,793 ▲3214.28 ▼0.371.94 ▲0.3045.14 ▼0.70
Dashboard /wp-admin2,202 ▲285.63 ▼0.0291.82 ▼8.6842.19 ▼4.10
Posts /wp-admin/edit.php2,101 ▲12.04 ▲0.0239.62 ▲3.2736.72 ▲1.15
Add New Post /wp-admin/post-new.php1,548 ▲323.04 ▲0.24666.83 ▲3.1354.61 ▼9.03
Media Library /wp-admin/upload.php1,401 ▲74.27 ▲0.0298.87 ▼5.4844.44 ▼1.55
Page categories /wp-admin/edit-tags.php?taxonomy=pagecategories&post_type=page1,2812.1428.2634.19

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
You still need to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • widget_recent-posts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts

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)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
The following issues need your attention
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/create-categories-for-pages-only/create-categories-for-pages-only.php:13

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine on the user side

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: pages, categories

create-categories-for-pages-only/create-categories-for-pages-only.php 92% from 13 tests

The primary PHP file in "Create Categories For Pages Only" version 1.0 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: The description should be shorter than 140 characters (currently 215 characters long)

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
Good job! No executable or dangerous file extensions detected57 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1131557

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.38
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
2 PNG files occupy 0.38MB with 0.26MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
screenshot-2.png275.22KB87.33KB▼ 68.27%
screenshot-1.png113.26KB35.33KB▼ 68.81%