90% get-image-from-post

Code Review | Get Image from Post

WordPress plugin Get Image from Post scored90%from 54 tests.

About plugin

  • Plugin page: get-image-from-post
  • Plugin version: 2017.08.13
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.0-4.8.0
  • WordPress version: 6.3.1
  • First release: Jun 7, 2009
  • Latest release: Jul 13, 2017
  • Number of updates: 26
  • Update frequency: every 113.8 days
  • Top authors: christopherross (84.62%)horshipsrectors (19.23%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /5,888 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
The plugin installed gracefully, with no errors

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

This is a short check of server-side resources used by Get Image from Post
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0143.87 ▲3.64
Dashboard /wp-admin3.31 ▲0.0152.10 ▼1.47
Posts /wp-admin/edit.php3.37 ▲0.0151.44 ▲1.12
Add New Post /wp-admin/post-new.php5.90 ▲0.0184.00 ▼12.65
Media Library /wp-admin/upload.php3.24 ▲0.0138.30 ▲0.02

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 2 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
theysaidso_admin_options
widget_recent-comments

Browser metrics Passed 4 tests

A check of browser resources used by Get Image from Post
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,789 ▲2814.22 ▼0.161.95 ▲0.2445.28 ▲1.15
Dashboard /wp-admin2,198 ▲185.59 ▼0.1197.90 ▲7.0041.41 ▲1.33
Posts /wp-admin/edit.php2,103 ▲32.01 ▲0.0335.23 ▼11.1534.32 ▼1.00
Add New Post /wp-admin/post-new.php1,526 ▼2217.58 ▼5.60696.79 ▼58.0158.50 ▼6.71
Media Library /wp-admin/upload.php1,400 ▼34.22 ▼0.01119.68 ▲17.0551.82 ▲7.87

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
You still need to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • widget_recent-posts
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • db_upgraded

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Everything seems fine, however this is by no means an exhaustive test

SRP Passed 2 tests

🔹 Tests weight: 20 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Congratulations! This plugin passed the SRP test

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)
There were no browser issues found

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
These attributes need your attention:
  • Donate link: Invalid URI found ("")
Please take inspiration from this readme.txt

get-image-from-post/get-image-from-post.php Passed 13 tests

Analyzing the main PHP file in "Get Image from Post" version 2017.08.13
71 characters long description:
Used to fetch images from your posts to display as part of the excerpt.

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
There were no executable files found in this plugin51 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1112251

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
This plugin has no cyclomatic complexity issues
Cyclomatic complexity
Average complexity per logical line of code0.45
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%
Functions2
▷ Named functions2100.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
No PNG files were detected