84% wp-api-categoriestags

Code Review | WP API Categories+Tags

WordPress plugin WP API Categories+Tags scored84%from 54 tests.

About plugin

  • Plugin page: wp-api-categories...
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.3-4.4.1
  • WordPress version: 6.3.1
  • First release: Jan 22, 2016
  • Latest release: Jan 22, 2016
  • Number of updates: 4
  • Update frequency: N/A
  • Top authors: judahnator (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /1,841 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▼0.66MB] [CPU: ▼15.65ms] Passed 4 tests

A check of server-side resources used by WP API Categories+Tags
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0040.02 ▼4.57
Dashboard /wp-admin3.31 ▲0.0151.43 ▲1.14
Posts /wp-admin/edit.php3.36 ▲0.0050.31 ▲4.05
Add New Post /wp-admin/post-new.php3.24 ▼2.6537.01 ▼60.49
Media Library /wp-admin/upload.php3.23 ▲0.0035.11 ▲1.34

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

Filesystem and database footprint
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_theysaidso_widget
db_upgraded
can_compress_scripts
widget_recent-comments
widget_recent-posts

Browser metrics Passed 4 tests

Checking browser requirements for WP API Categories+Tags
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲2913.21 ▼1.571.62 ▼0.5642.40 ▼1.74
Dashboard /wp-admin2,206 ▲184.87 ▼0.16107.91 ▼0.0443.50 ▲3.29
Posts /wp-admin/edit.php2,089 ▼02.00 ▼0.0141.02 ▲0.7535.42 ▼2.91
Add New Post /wp-admin/post-new.php1,529 ▲1018.49 ▼4.65663.27 ▲4.1764.28 ▲19.18
Media Library /wp-admin/upload.php1,388 ▼34.20 ▼0.0197.69 ▼0.2141.08 ▼2.53

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
Please fix the following items
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • can_compress_scripts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Good news, no errors were detected

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
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugin_dir_path() in wp-content/plugins/wp-api-categoriestags/wp_api_categories_tags.php:12

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 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Plugin Name: Write the name of your plugin instead of "Plugin Name" on the first line ( === wp-api-categoriestags === )
The official readme.txt might help

wp-api-categoriestags/wp_api_categories_tags.php 92% from 13 tests

This is the main PHP file of "WP API Categories+Tags" version 1.0, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("wp-api-categoriestags.php" instead of "wp_api_categories_tags.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
No dangerous file extensions were detected136 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
PHP31514136

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.44
Average class complexity10.00
▷ Minimum class complexity4.00
▷ Maximum class complexity16.00
Average method complexity3.00
▷ Minimum method complexity1.00
▷ Maximum method complexity7.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods9
▷ Static methods00.00%
▷ Public methods888.89%
▷ Protected methods00.00%
▷ Private methods111.11%
Functions1
▷ Named functions00.00%
▷ Anonymous functions1100.00%
Constants1
▷ Global constants1100.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
PNG images were not found in this plugin