84% catch-import-export

Code Review | Catch Import Export

WordPress plugin Catch Import Export scored84%from 54 tests.

About plugin

  • Plugin page: catch-import-export
  • Plugin version: 2.2
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.4
  • WordPress version: 6.3.1
  • First release: Oct 3, 2018
  • Latest release: Nov 15, 2023
  • Number of updates: 21
  • Update frequency: every 89.0 days
  • Top authors: catchthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /3,571 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.17MB] [CPU: ▼4.52ms] Passed 4 tests

An overview of server-side resources used by Catch Import Export
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.64 ▲0.1739.94 ▲1.21
Dashboard /wp-admin3.48 ▲0.1345.83 ▼13.37
Posts /wp-admin/edit.php3.59 ▲0.2346.02 ▼0.21
Add New Post /wp-admin/post-new.php6.08 ▲0.1993.56 ▼1.57
Media Library /wp-admin/upload.php3.40 ▲0.1733.50 ▼2.94

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 39 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
can_compress_scripts
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts

Browser metrics Passed 4 tests

A check of browser resources used by Catch Import Export
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,820 ▲6914.66 ▲0.241.60 ▼0.1240.84 ▼4.08
Dashboard /wp-admin2,225 ▲485.72 ▲0.2096.88 ▲1.9141.31 ▼1.04
Posts /wp-admin/edit.php2,133 ▲332.07 ▲0.1042.35 ▲3.9735.59 ▼2.50
Add New Post /wp-admin/post-new.php1,553 ▲2323.10 ▲0.21619.43 ▼77.7555.96 ▼2.26
Media Library /wp-admin/upload.php1,433 ▲364.27 ▲0.0699.59 ▼15.8042.87 ▼5.21

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-comments
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_theysaidso_widget
    • db_upgraded
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check 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 fix the following
  • 10× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function remove_action() in wp-content/plugins/catch-import-export/includes/CatchThemesThemePlugin.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-import-export/admin/partials/sidebar.php:3
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_url() in wp-content/plugins/catch-import-export/admin/partials/footer.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-import-export/admin/partials/features-display.php:4
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Control' not found in wp-content/plugins/catch-import-export/admin/classes/class-catch-import-export-control.php:8
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Customize_Setting' not found in wp-content/plugins/catch-import-export/admin/classes/class-catch-import-export-option.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function esc_html_e() in wp-content/plugins/catch-import-export/admin/partials/catch-import-export-display.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/catch-import-export/includes/ctp-tabs-removal.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/catch-import-export/admin/classes/control.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_nonce_field() in wp-content/plugins/catch-import-export/admin/partials/dashboard-display.php:24

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is important because it is parsed by WordPress.org for the public listing of your plugin
6 plugin tags: customizer export, export, customizer settings, customizer, import...

catch-import-export/catch-import-export.php 92% from 13 tests

The principal PHP file in "Catch Import Export" v. 2.2 is loaded by WordPress automatically on each request
Please make the necessary changes and fix the following:
  • Description: If Twitter did it, so should we! Keep the description under 140 characters (currently 209 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
Everything looks great! No dangerous files found in this plugin1,837 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
PHP193086681,056
CSS213617692
JavaScript420489

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.29
Average class complexity11.89
▷ Minimum class complexity1.00
▷ Maximum class complexity51.00
Average method complexity3.39
▷ Minimum method complexity1.00
▷ Maximum method complexity29.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes9
▷ Abstract classes00.00%
▷ Concrete classes9100.00%
▷ Final classes222.22%
Methods41
▷ Static methods921.95%
▷ Public methods3175.61%
▷ Protected methods12.44%
▷ Private methods921.95%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants4
▷ Global constants4100.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.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
admin/images/premium-plugin-246x116.png9.01KB4.16KB▼ 53.83%
admin/images/free-plugin-246x116.png8.01KB3.81KB▼ 52.42%