84% wp-power-ocr-free

Code Review | WP Power OCR

WordPress plugin WP Power OCR scored84%from 54 tests.

About plugin

  • Plugin page: wp-power-ocr-free
  • Plugin version: 1.04
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 3.5-6.2
  • WordPress version: 6.3.1
  • First release: Mar 24, 2016
  • Latest release: Mar 29, 2023
  • Number of updates: 23
  • Update frequency: every 111.4 days
  • Top authors: manu225 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /3,303 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Install script ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲1.84ms] Passed 4 tests

This is a short check of server-side resources used by WP Power OCR
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0337.74 ▼0.18
Dashboard /wp-admin3.36 ▲0.0655.51 ▼0.37
Posts /wp-admin/edit.php3.48 ▲0.1260.69 ▲9.84
Add New Post /wp-admin/post-new.php5.92 ▲0.0491.53 ▼1.61
Media Library /wp-admin/upload.php3.26 ▲0.0444.94 ▲9.51
Settings /wp-admin/admin.php?page=wp_power_ocr_settings3.2637.50
WP Power OCR /wp-admin/admin.php?page=wp_power_ocr3.2637.92

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 9 new options
New WordPress options
theysaidso_admin_options
wpo_username
can_compress_scripts
widget_theysaidso_widget
wpo_licence_code
db_upgraded
widget_recent-comments
widget_recent-posts
wpo_language

Browser metrics Passed 4 tests

Checking browser requirements for WP Power OCR
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,978 ▲23214.79 ▲0.571.78 ▼0.0939.53 ▼6.26
Dashboard /wp-admin2,369 ▲1816.52 ▲0.51139.13 ▲32.1493.41 ▲49.28
Posts /wp-admin/edit.php2,296 ▲2073.42 ▲1.3754.81 ▲17.6482.69 ▲47.07
Add New Post /wp-admin/post-new.php1,706 ▲17322.45 ▼0.59650.25 ▼39.2537.30 ▼27.76
Media Library /wp-admin/upload.php1,423 ▲384.15 ▼0.0793.76 ▼15.0086.14 ▲39.21
Settings /wp-admin/admin.php?page=wp_power_ocr_settings1,2173.0841.8668.63
WP Power OCR /wp-admin/admin.php?page=wp_power_ocr1,2173.0839.9562.89

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
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_theysaidso_widget
    • widget_recent-posts
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options

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 everything seems fine, this is not an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please fix the following items
  • 3× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function register_activation_hook() in wp-content/plugins/wp-power-ocr-free/wp-power-ocr-free.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function admin_url() in wp-content/plugins/wp-power-ocr-free/views/importer.php:73
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_option() in wp-content/plugins/wp-power-ocr-free/views/settings.php:52

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
There were no browser issues found

Optimizations

Plugin configuration 93% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
10 plugin tags: image extraction, document text extraction, ocr, text recognition, image importer...

wp-power-ocr-free/wp-power-ocr-free.php 85% from 13 tests

"WP Power OCR" version 1.04's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
The following require your attention:
  • Domain Path: Prefix the domain path with a forward slash character ("/")
  • Domain Path: Note that the domain path follows the same naming rules as the domain name, using only dashes and lowercase characters ("")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
No dangerous file extensions were detected368 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP38837286
CSS114082

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
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
5 PNG files occupy 0.03MB with 0.01MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/pro.png24.10KB8.81KB▼ 63.46%
images/icon.png0.42KB0.35KB▼ 17.25%
images/fb.png1.59KB1.00KB▼ 37.42%
images/add.png1.09KB1.21KB0.00%
images/go.png1.20KB1.27KB0.00%