79% export-categories

Code Review | Export Categories

WordPress plugin Export Categories scored79%from 54 tests.

About plugin

  • Plugin page: export-categories
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 2.9-5.1.1
  • WordPress version: 6.3.1
  • First release: Aug 23, 2013
  • Latest release: Mar 26, 2019
  • Number of updates: 10
  • Update frequency: every 204.1 days
  • Top authors: shambhu patnaik (100%)

Code review

54 tests

User reviews

12 reviews

Install metrics

1,000+ active /21,426 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▼9.14ms] Passed 4 tests

Analyzing server-side resources used by Export Categories
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0241.23 ▲1.47
Dashboard /wp-admin3.34 ▲0.0355.22 ▲0.43
Posts /wp-admin/edit.php3.39 ▲0.0352.73 ▼5.82
Add New Post /wp-admin/post-new.php5.92 ▲0.0387.03 ▼23.36
Media Library /wp-admin/upload.php3.26 ▲0.0237.45 ▼7.81
Export Categories /wp-admin/tools.php?page=export-categories-admin_home3.2234.28

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

Export Categories: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,818 ▲5714.34 ▲0.062.29 ▲0.5241.66 ▼3.30
Dashboard /wp-admin2,199 ▲225.64 ▼0.0391.80 ▼4.8540.01 ▼0.22
Posts /wp-admin/edit.php2,107 ▲72.00 ▼0.0144.14 ▲2.7535.72 ▼2.96
Add New Post /wp-admin/post-new.php1,532 ▲623.28 ▼0.32648.38 ▼12.2249.36 ▼2.78
Media Library /wp-admin/upload.php1,401 ▲14.18 ▼0.05102.06 ▼8.9143.92 ▼3.01
Export Categories /wp-admin/tools.php?page=export-categories-admin_home7862.0027.2026.35

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
You still need to fix the following
  • Zombie WordPress options detected upon uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments

Smoke tests 50% 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)
Even though everything seems fine, this is not an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/export-categories/index.php
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_deactivation_hook() in wp-content/plugins/export-categories/export-categories.php:10

User-side errors Passed 1 test

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

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: export categories, export-categories, export

export-categories/export-categories.php Passed 13 tests

The main file in "Export Categories" v. 1.0 serves as a complement to information provided in readme.txt and as the entry point to the plugin
62 characters long description:
export you wordpress categories only to another wordpress site

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Success! There were no dangerous files found in this plugin141 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP23793141

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.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%
Functions9
▷ Named functions9100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png11.01KB5.05KB▼ 54.16%