84% expand-category-sakai

Code Review | Expand Category Sakai

WordPress plugin Expand Category Sakai scored84%from 54 tests.

About plugin

  • Plugin page: expand-category-s...
  • Plugin version: 1.0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5.2-3.8.1
  • WordPress version: 6.3.1
  • First release: Mar 9, 2014
  • Latest release: Mar 23, 2014
  • Number of updates: 4
  • Update frequency: every 3.5 days
  • Top authors: tomotomobile (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /779 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 successfully, without throwing any errors or notices

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

Server-side resources used by Expand Category Sakai
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0138.17 ▼8.35
Dashboard /wp-admin3.32 ▲0.0157.35 ▼0.56
Posts /wp-admin/edit.php3.37 ▲0.0148.61 ▼3.89
Add New Post /wp-admin/post-new.php5.90 ▲0.0186.65 ▼9.36
Media Library /wp-admin/upload.php3.24 ▲0.0140.87 ▲5.12

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

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

Browser metrics Passed 4 tests

A check of browser resources used by Expand Category Sakai
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲314.18 ▼0.171.72 ▼0.5041.57 ▼3.80
Dashboard /wp-admin2,195 ▲155.58 ▼0.0789.66 ▼9.5042.97 ▲0.66
Posts /wp-admin/edit.php2,100 ▼31.98 ▲0.0236.89 ▼3.0533.58 ▼2.39
Add New Post /wp-admin/post-new.php1,526 ▼223.73 ▲0.49685.79 ▼26.5272.34 ▲16.69
Media Library /wp-admin/upload.php1,403 ▲34.20 ▲0.03111.36 ▼0.0547.28 ▲2.87

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
These items require your attention
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • widget_theysaidso_widget
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function plugins_url() in wp-content/plugins/expand-category-sakai/expand-category-sakai.php:28

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: post, category, shortcode

expand-category-sakai/expand-category-sakai.php 92% from 13 tests

"Expand Category Sakai" version 1.0.1's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
You should first fix the following items:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Everything looks great! No dangerous files found in this plugin39 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1121739

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.00
▷ Minimum class complexity5.00
▷ Maximum class complexity5.00
Average method complexity2.00
▷ Minimum method complexity1.00
▷ Maximum method complexity4.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants00.00%
▷ Class constants1100.00%
▷ Public constants1100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There were not PNG files found in your plugin