62% post-to-captorra

Code Review | Post to Captorra

WordPress plugin Post to Captorra scored 62% from 54 tests.

About plugin

  • Plugin page: post-to-captorra
  • Plugin version: 1.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-5.9
  • WordPress version: 5.8.1
  • First release: Apr 3, 2020
  • Latest release: Feb 3, 2022
  • Number of updates: 29
  • Update frequency: every 23.1 days
  • Top authors: joebermudez (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active / 489 total downloads

Benchmarks

Plugin footprint 65% 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: ▲3.79MB] [CPU: ▼123.37ms] Passed 4 tests

This is a short check of server-side resources used by Post to Captorra
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /6.43 ▲3.5945.61 ▲23.57
Dashboard /wp-admin6.87 ▲3.8151.98 ▲16.13
Posts /wp-admin/edit.php6.99 ▲3.8850.18 ▲20.73
Add New Post /wp-admin/post-new.php9.40 ▲3.9690.85 ▼553.90
Media Library /wp-admin/upload.php6.91 ▲3.9048.28 ▲24.34
Field Groups /wp-admin/edit.php?post_type=acf-field-group6.8942.98
API Logs /wp-admin/admin.php?page=capi_logs_admin_page6.7940.91
Integrations /wp-admin/edit.php?post_type=capi_integration6.8741.92
Add New /wp-admin/post-new.php?post_type=acf-field-group6.9859.63
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools6.9042.96
Dashboard /wp-admin/admin.php?page=capi_dashboard_admin_page6.7841.04

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 265 new files
Database: 2 new tables, 1 new option
New tables
wp_capi_process_log
wp_capi_api_log
New WordPress options
acf_version

Browser metrics Passed 4 tests

Post to Captorra: an overview of browser usage
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,908 ▲30716.29 ▲0.7116.35 ▲10.9479.86 ▲7.05
Dashboard /wp-admin3,010 ▲1116.15 ▲0.00115.39 ▼16.17168.14 ▼5.02
Posts /wp-admin/edit.php2,824 ▲1183.38 ▲0.0163.46 ▲1.22134.99 ▼1.27
Add New Post /wp-admin/post-new.php4,489 ▲79119.07 ▲0.27565.34 ▲115.24166.21 ▼0.89
Media Library /wp-admin/upload.php2,485 ▲73310.79 ▲5.28226.46 ▲69.63188.89 ▲2.33
Field Groups /wp-admin/edit.php?post_type=acf-field-group1,7053.2864.20132.89
API Logs /wp-admin/admin.php?page=capi_logs_admin_page1,2922.5657.06105.50
Integrations /wp-admin/edit.php?post_type=capi_integration1,5013.3061.54110.98
Add New /wp-admin/post-new.php?post_type=acf-field-group3,1965.69108.57217.71
Tools /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools1,5934.3274.87159.09
Dashboard /wp-admin/admin.php?page=capi_dashboard_admin_page1,1572.5556.23110.83

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
You still need to fix the following
  • Uninstall procedure had uncaught errors
    • > Notice in wp-content/plugins/post-to-captorra/post-to-captorra.php+827
    Undefined offset: 1
  • Zombie WordPress options detected upon uninstall: 1 option
    • acf_version

Smoke tests 25% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Smoke test failed, please fix the following
  • 2 occurences, only the last one shown
    • > GET request to /wp-admin/post-new.php?post_type=acf-field-group
    • > POST request to /wp-admin/admin-ajax.php?action=capi_load_selected
    • > Notice in wp-content/plugins/post-to-captorra/post-to-captorra.php+1210
    Undefined index: id

SRP 50% from 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
The following issues need your attention
  • 80× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Notice
      Undefined variable: rule in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/admin/views/html-location-rule.php on line 4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/l10n.php:153
    • > PHP Fatal error
      require_once(): Failed opening required 'ABSPATHwp-admin/includes/class-wp-list-table.php' (include_path='.:/usr/share/php') in wp-content/plugins/post-to-captorra/class/capi_log_list_table.php on line 4
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/fields/class-acf-field-tab.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/forms/form-comment.php:34
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/fields/class-acf-field-checkbox.php:5
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/fields/class-acf-field-relationship.php:5
    • > PHP Fatal error
      Uncaught Error: Call to undefined function _e() in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/admin/views/html-admin-page-upgrade.php:26
    • > PHP Fatal error
      Uncaught Error: Class 'acf_field' not found in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/fields/class-acf-field-date_picker.php:5
    • > PHP Notice
      Trying to access array offset on value of type null in wp-content/plugins/post-to-captorra/lib/advanced-custom-fields/includes/admin/views/html-location-rule.php on line 4

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
Please take a look at the following user-side issues
    • > GET request to /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools
    • > Javascript (severe) in unknown
    /wp-admin/edit.php?post_type=acf-field-group&page=acf-tools 357:50 Uncaught SyntaxError: Unexpected token '}'

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Donate link: Please fix this invalid URI: ""
You can look at the official readme.txt

post-to-captorra/post-to-captorra.php 92% from 13 tests

The entry point to "Post to Captorra" version 1.1.5 is a PHP file that has certain tags in its header comment area
You should first fix the following items:
  • Description: The description should be shorter than 140 characters (currently 213 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
Success! There were no dangerous files found in this plugin113,881 lines of code in 206 files:
LanguageFilesBlank linesComment linesLines of code
PO File3123,80540,55148,965
JavaScript195,8925,99138,520
PHP1399,01118,48020,298
CSS154957396,078
Markdown111014
SVG1006

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.37
Average class complexity14.68
▷ Minimum class complexity1.00
▷ Maximum class complexity78.00
Average method complexity2.86
▷ Minimum method complexity1.00
▷ Maximum method complexity24.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes103
▷ Abstract classes21.94%
▷ Concrete classes10198.06%
▷ Final classes00.00%
Methods755
▷ Static methods10.13%
▷ Public methods73697.48%
▷ Protected methods00.00%
▷ Private methods192.52%
Functions492
▷ Named functions48999.39%
▷ Anonymous functions30.61%
Constants27
▷ Global constants27100.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
12 PNG files occupy 0.30MB with 0.06MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
lib/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_ffffff_256x240.png3.68KB4.17KB0.00%
assets/screenshot-1.png51.34KB26.68KB▼ 48.03%
assets/screenshot-4.png54.25KB29.75KB▼ 45.17%
lib/advanced-custom-fields/assets/inc/select2/3/select2.png0.51KB0.99KB0.00%
lib/advanced-custom-fields/assets/inc/datepicker/images/ui-icons_DDDDDD_256x240.png3.68KB4.17KB0.00%