84% image-to-text

Code Review | Image to Text

WordPress plugin Image to Text scored84%from 54 tests.

About plugin

  • Plugin page: image-to-text
  • Plugin version: 2.08
  • PHP compatiblity: 8.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.7-6.4
  • WordPress version: 6.3.1
  • First release: Jul 28, 2018
  • Latest release: Oct 29, 2023
  • Number of updates: 40
  • Update frequency: every 48.0 days
  • Top authors: Katsushi Kawamori (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /2,195 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
Install script ran successfully

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

A check of server-side resources used by Image to Text
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.50 ▲0.0337.31 ▲1.00
Dashboard /wp-admin3.32 ▼0.0241.58 ▼12.09
Posts /wp-admin/edit.php3.37 ▲0.0241.04 ▼2.84
Add New Post /wp-admin/post-new.php5.91 ▲0.0279.62 ▼5.59
Media Library /wp-admin/upload.php3.25 ▲0.0231.76 ▼1.91
Image to Text /wp-admin/options-general.php?page=ImageToText3.2130.00

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

Input-output and database impact of this plugin
This plugin installed successfully
Filesystem: 16 new files
Database: no new tables, 7 new options
New WordPress options
theysaidso_admin_options
widget_recent-comments
can_compress_scripts
db_upgraded
widget_theysaidso_widget
image_to_text
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Image to Text
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,799 ▲2814.42 ▼0.111.67 ▼0.1637.98 ▼5.43
Dashboard /wp-admin2,205 ▲315.56 ▼0.0180.15 ▼4.9435.53 ▼3.34
Posts /wp-admin/edit.php2,104 ▲42.02 ▲0.0033.27 ▼2.7632.34 ▼4.57
Add New Post /wp-admin/post-new.php6,199 ▲4,66319.03 ▼4.23898.62 ▲199.3551.91 ▼0.96
Media Library /wp-admin/upload.php1,407 ▲74.15 ▲0.0594.81 ▼9.7244.10 ▲0.14
Image to Text /wp-admin/options-general.php?page=ImageToText1,2942.6359.9328.31

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

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

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Almost there! Just fix the following items
  • 3× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/image-to-text/lib/class-imagetotext.php:58
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/image-to-text/lib/class-imagetotextadmin.php:51
    • > PHP Fatal error
      Uncaught Error: Call to undefined function wp_upload_dir() in wp-content/plugins/image-to-text/lib/class-imagetotext.php:58

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine on the user side

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
5 plugin tags: block, text, font, shortcode, image

image-to-text/imagetotext.php 92% from 13 tests

The main PHP file in "Image to Text" ver. 2.08 adds more information about the plugin and also serves as the entry point for this plugin
Please make the necessary changes and fix the following:
  • Main file name: The principal plugin file should be the same as the plugin slug ("image-to-text.php" instead of "imagetotext.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected660 lines of code in 9 files:
LanguageFilesBlank linesComment linesLines of code
PHP5101244540
JavaScript31217100
JSON10020

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity31.00
▷ Minimum class complexity26.00
▷ Maximum class complexity36.00
Average method complexity4.75
▷ Minimum method complexity1.00
▷ Maximum method complexity17.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes2
▷ Abstract classes00.00%
▷ Concrete classes2100.00%
▷ Final classes00.00%
Methods16
▷ Static methods00.00%
▷ Public methods1062.50%
▷ Protected methods00.00%
▷ Private methods637.50%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.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
There were not PNG files found in your plugin