84% hearme-ai

Code Review | HearMe.ai

WordPress plugin HearMe.ai scored84%from 54 tests.

About plugin

  • Plugin page: hearme-ai
  • Plugin version: 1.15.6
  • PHP compatiblity: 7.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.7-6.0
  • WordPress version: 6.3.1
  • First release: Mar 29, 2022
  • Latest release: Sep 11, 2023
  • Number of updates: 24
  • Update frequency: every 22.1 days
  • Top authors: hearmeai (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /922 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
This plugin's installer ran successfully

Server metrics [RAM: ▲1.29MB] [CPU: ▲23.68ms] Passed 4 tests

Analyzing server-side resources used by HearMe.ai
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /4.76 ▲1.3064.45 ▲23.46
Dashboard /wp-admin4.64 ▲1.2974.42 ▲10.99
Posts /wp-admin/edit.php4.69 ▲1.3378.25 ▲31.74
Add New Post /wp-admin/post-new.php7.18 ▲1.29123.37 ▲28.53
Media Library /wp-admin/upload.php4.50 ▲1.2764.97 ▲34.43
Setup Wizard /wp-admin/admin.php?page=hear-me-wizard6.6272.40

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

Filesystem and database footprint
No storage issues were detected
Filesystem: 484 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-comments
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

A check of browser resources used by HearMe.ai
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,876 ▲13014.47 ▲0.171.67 ▼0.5935.71 ▼7.11
Dashboard /wp-admin2,285 ▲974.88 ▼0.01100.54 ▼6.7270.55 ▲26.50
Posts /wp-admin/edit.php2,168 ▲792.03 ▲0.0239.73 ▲3.4536.51 ▲3.66
Add New Post /wp-admin/post-new.php1,589 ▲4722.93 ▲4.65724.20 ▲94.6251.96 ▼10.38
Media Library /wp-admin/upload.php1,458 ▲764.23 ▲0.0497.87 ▼0.3271.84 ▲28.93
Setup Wizard /wp-admin/admin.php?page=hear-me-wizard9732.0429.5245.08

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
The following items require your attention
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
The smoke test was a success, however most plugin functionality was not tested

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 items
  • 209× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Symfony\\Component\\Dotenv\\Exception\\ExceptionInterface' not found in wp-content/plugins/hearme-ai/vendor/symfony/dotenv/Exception/FormatException.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'HearMe\\Includes\\HMA_Endpoint' not found in wp-content/plugins/hearme-ai/src/Endpoints/HMA_GenerateAllDrafts.php:8
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\Http\\Message\\UploadedFileInterface' not found in wp-content/plugins/hearme-ai/vendor/guzzlehttp/psr7/src/UploadedFile.php:12
    • > PHP Fatal error
      Uncaught Error: Class 'HearMe\\Includes\\HMA_Endpoint' not found in wp-content/plugins/hearme-ai/src/Endpoints/HMA_GetPlayer.php:9
    • > PHP Fatal error
      Uncaught Error: Class 'PHPUnit\\Framework\\TestCase' not found in wp-content/plugins/hearme-ai/vendor/twig/twig/src/Test/IntegrationTestCase.php:30
    • > PHP Fatal error
      Uncaught Error: Class 'GuzzleHttp\\Exception\\TransferException' not found in wp-content/plugins/hearme-ai/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:15
    • > PHP Fatal error
      Uncaught Error: Class 'HearMe\\Includes\\HMA_Endpoint' not found in wp-content/plugins/hearme-ai/src/Endpoints/HMA_CostInfo.php:10
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\ode' not found in wp-content/plugins/hearme-ai/vendor/twig/twig/src/Node/BlockNode.php:22
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\\TokenParser\\AbstractTokenParser' not found in wp-content/plugins/hearme-ai/vendor/twig/twig/src/TokenParser/FlushTokenParser.php:25
    • > PHP Fatal error
      Uncaught Error: Class 'Twig\ode\\Expression\\AbstractExpression' not found in wp-content/plugins/hearme-ai/vendor/twig/twig/src/Node/Expression/ConditionalExpression.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for browser errors
Everything seems fine, but this is not an exhaustive test

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
4 plugin tags: voice, hearme, podcast, blog

hearme-ai/hearme-ai.php 92% from 13 tests

The main file in "HearMe.ai" v. 1.15.6 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6

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 plugin34,496 lines of code in 423 files:
LanguageFilesBlank linesComment linesLines of code
PHP3525,30910,41826,935
Markdown201,29803,753
JSON15001,617
SVG8001,478
Twig18180284
JavaScript4261245
YAML34533164
reStructuredText18510
make1409
CSS1001

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity problems
Cyclomatic complexity
Average complexity per logical line of code0.47
Average class complexity9.95
▷ Minimum class complexity1.00
▷ Maximum class complexity166.00
Average method complexity2.69
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces51
Interfaces39
Traits3
Classes287
▷ Abstract classes206.97%
▷ Concrete classes26793.03%
▷ Final classes10338.58%
Methods1,767
▷ Static methods21011.88%
▷ Public methods1,48383.93%
▷ Protected methods633.57%
▷ Private methods22112.51%
Functions327
▷ Named functions18656.88%
▷ Anonymous functions14143.12%
Constants129
▷ Global constants118.53%
▷ Class constants11891.47%
▷ Public constants10689.83%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
4 PNG files occupy 0.01MB with 0.01MB in potential savings
Potential savings
Compression of 4 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/img/before_p.png2.23KB0.93KB▼ 58.29%
assets/img/after_h.png2.24KB0.97KB▼ 56.64%
assets/img/before_h.png2.32KB0.99KB▼ 57.49%
assets/img/after_p.png2.22KB0.94KB▼ 57.59%