84% heartrails-capture

Code Review | HeartRails Capture (Webpage Screenshot)

WordPress plugin HeartRails Capture (Webpage Screenshot) scored84%from 54 tests.

About plugin

  • Plugin page: heartrails-capture
  • Plugin version: 1.8
  • PHP version: 7.4.16
  • WordPress compatibility: 3.6.1-3.9.1
  • WordPress version: 6.3.1
  • First release: Oct 11, 2013
  • Latest release: May 13, 2014
  • Number of updates: 12
  • Update frequency: every 17.8 days
  • Top authors: jz5 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,485 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.00MB] [CPU: ▼1.35ms] Passed 4 tests

A check of server-side resources used by HeartRails Capture (Webpage Screenshot)
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0037.35 ▲0.33
Dashboard /wp-admin3.31 ▲0.0145.55 ▼1.05
Posts /wp-admin/edit.php3.36 ▲0.0145.64 ▼0.94
Add New Post /wp-admin/post-new.php5.89 ▲0.0183.80 ▼3.74
Media Library /wp-admin/upload.php3.23 ▲0.0033.28 ▲1.43
HeartRails Capture /wp-admin/options-general.php?page=capture-heartrails-admin-menu3.2030.68

Server storage [IO: ▲0.01MB] [DB: ▲0.07MB] Passed 3 tests

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
widget_recent-posts
theysaidso_admin_options
can_compress_scripts
db_upgraded
widget_recent-comments
widget_theysaidso_widget

Browser metrics Passed 4 tests

This is an overview of browser requirements for HeartRails Capture (Webpage Screenshot)
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲5813.65 ▼0.731.78 ▼0.1543.88 ▲1.56
Dashboard /wp-admin2,210 ▲225.86 ▲0.0596.44 ▼6.6135.92 ▼4.98
Posts /wp-admin/edit.php2,093 ▲42.01 ▲0.0433.58 ▼3.4335.37 ▼0.64
Add New Post /wp-admin/post-new.php1,527 ▼923.19 ▲0.24655.35 ▼21.9653.23 ▲1.92
Media Library /wp-admin/upload.php1,389 ▲44.25 ▲0.0393.72 ▼0.8142.94 ▲1.63
HeartRails Capture /wp-admin/options-general.php?page=capture-heartrails-admin-menu8352.0122.7325.95

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • db_upgraded
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • can_compress_scripts
    • widget_recent-comments

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
Even though everything seems fine, this is not 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 items
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/heartrails-capture/capture-heartrails.php:56

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
There were no browser issues found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
2 plugin tags: screenshot, capture

heartrails-capture/capture-heartrails.php 92% from 13 tests

The main file in "HeartRails Capture (Webpage Screenshot)" v. 1.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
The following require your attention:
  • Main file name: Name the main plugin file the same as the plugin slug ("heartrails-capture.php" instead of "capture-heartrails.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
No dangerous file extensions were detected140 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP14026140

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.33
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 functions888.89%
▷ Anonymous functions111.11%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
No PNG files were detected