83% extract-text-from-image-etfi

Code Review | Extract Text from Image - ETFI

WordPress plugin Extract Text from Image - ETFI scored83%from 54 tests.

About plugin

  • Plugin page: extract-text-from...
  • Plugin version: 1.2.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-5.8.2
  • WordPress version: 6.3.1
  • First release: Jul 23, 2021
  • Latest release: Dec 6, 2021
  • Number of updates: 8
  • Update frequency: every 17.0 days
  • Top authors: sanatantechnovation (100%)

Code review

54 tests

User reviews

1 review

Install metrics

30+ active /2,179 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
This plugin's installer ran successfully

Server metrics [RAM: ▲0.62MB] [CPU: ▼7.99ms] Passed 4 tests

Analyzing server-side resources used by Extract Text from Image - ETFI
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.08 ▲0.6143.94 ▲4.75
Dashboard /wp-admin3.98 ▲0.6755.78 ▲0.92
Posts /wp-admin/edit.php4.03 ▲0.6750.70 ▼3.39
Add New Post /wp-admin/post-new.php6.50 ▲0.6194.19 ▼32.39
Media Library /wp-admin/upload.php3.84 ▲0.6140.57 ▲2.91

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

How much does this plugin use your filesystem and database?
There were no storage issued detected upon installing this plugin
Filesystem: 1,682 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Extract Text from Image - ETFI
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,894 ▲13313.42 ▼1.138.75 ▲6.9742.24 ▼2.79
Dashboard /wp-admin2,211 ▲375.55 ▼0.1294.78 ▲6.3143.87 ▼0.63
Posts /wp-admin/edit.php2,116 ▲132.03 ▲0.0234.14 ▼17.8733.99 ▼10.08
Add New Post /wp-admin/post-new.php1,541 ▲1523.17 ▼0.34675.64 ▼34.8367.99 ▲1.12
Media Library /wp-admin/upload.php1,416 ▲164.21 ▲0.03100.54 ▼2.5241.43 ▼3.32

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_recent-comments
    • widget_theysaidso_widget
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
Everything seems fine, however 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
  • 713× PHP files trigger server errors when accessed directly (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/DataExchange/Exception/DataExchangeException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/DevOpsGuru/DevOpsGuruClient.php:51
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/FMS/Exception/FMSException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/IoTEventsData/IoTEventsDataClient.php:31
    • > PHP Fatal error
      Uncaught Error: Interface 'GuzzleHttp\\Cookie\\CookieJarInterface' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/GuzzleHttp/Cookie/CookieJar.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Exception\\AwsException' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/MWAA/Exception/MWAAException.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/ResourceGroups/ResourceGroupsClient.php:41
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/SageMakerRuntime/SageMakerRuntimeClient.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\Api\\Shape' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/Api/MapShape.php:7
    • > PHP Fatal error
      Uncaught Error: Class 'Aws\\AwsClient' not found in wp-content/plugins/extract-text-from-image-etfi/vendor/Aws/Transfer/TransferClient.php:59

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
No browser issues were found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
Please fix the following attributes: The official readme.txt might help

extract-text-from-image-etfi/index.php 92% from 13 tests

The principal PHP file in "Extract Text from Image - ETFI" v. 1.2.1 is loaded by WordPress automatically on each request
It is important to fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("extract-text-from-image-etfi.php" instead of "index.php")

Code Analysis 97% from 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
Everything looks great! No dangerous files found in this plugin55,628 lines of code in 1,676 files:
LanguageFilesBlank linesComment linesLines of code
PHP1,6657,21238,77447,727
Markdown52,58106,942
JavaScript33515610
CSS3914349

PHP code 50% from 2 tests

This is a very shot review of cyclomatic complexity and code structure
These items need your attention
  • Method cyclomatic complexity has to be reduced to less than 100 (currently 179)
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity5.55
▷ Minimum class complexity1.00
▷ Maximum class complexity179.00
Average method complexity2.70
▷ Minimum method complexity1.00
▷ Maximum method complexity179.00
Code structure
Namespaces580
Interfaces45
Traits24
Classes830
▷ Abstract classes131.57%
▷ Concrete classes81798.43%
▷ Final classes253.06%
Methods2,423
▷ Static methods41717.21%
▷ Public methods1,66668.76%
▷ Protected methods1305.37%
▷ Private methods62725.88%
Functions452
▷ Named functions8418.58%
▷ Anonymous functions36881.42%
Constants297
▷ Global constants4013.47%
▷ Class constants25786.53%
▷ Public constants257100.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.14MB with 0.08MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/css/background.png22.47KB9.85KB▼ 56.17%
assets/images/screenshot-3.png125.67KB48.83KB▼ 61.15%