84% rajoshik-post-feature-image-from-url

Code Review | aaM Upload Feature Image From URL

WordPress plugin aaM Upload Feature Image From URL scored84%from 54 tests.

About plugin

  • Plugin page: rajoshik-post-fea...
  • Plugin version: 1.2
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0-4.9
  • WordPress version: 6.3.1
  • First release: Sep 28, 2014
  • Latest release: Sep 11, 2018
  • Number of updates: 5
  • Update frequency: every 288.8 days
  • Top authors: aamahin (100%)

Code review

54 tests

User reviews

5 reviews

Install metrics

100+ active /3,697 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.02MB] [CPU: ▼5.83ms] Passed 4 tests

A check of server-side resources used by aaM Upload Feature Image From URL
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0241.41 ▼4.22
Dashboard /wp-admin3.32 ▲0.0247.64 ▼6.85
Posts /wp-admin/edit.php3.38 ▲0.0249.38 ▼0.80
Add New Post /wp-admin/post-new.php5.90 ▲0.0287.20 ▼10.01
Media Library /wp-admin/upload.php3.25 ▲0.0236.10 ▼2.25

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

How much does this plugin use your filesystem and database?
The plugin installed successfully
Filesystem: 3 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
can_compress_scripts
widget_recent-comments
theysaidso_admin_options
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for aaM Upload Feature Image From URL
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,792 ▲614.37 ▼0.271.50 ▼0.7340.70 ▼5.14
Dashboard /wp-admin2,198 ▲185.65 ▲0.0487.08 ▼2.1540.06 ▼5.80
Posts /wp-admin/edit.php2,103 ▼01.99 ▼0.0340.91 ▼1.9635.09 ▼2.56
Add New Post /wp-admin/post-new.php6,235 ▲4,70925.97 ▲2.75921.84 ▲243.5673.92 ▲19.20
Media Library /wp-admin/upload.php1,400 ▼04.18 ▼0.0498.42 ▼3.9742.37 ▼2.70

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
Please fix the following items
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_theysaidso_widget

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A smoke test targeting server-side errors
The smoke test was a success, however most plugin functionality was not tested

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
Almost there! Just fix the following items
  • 1× PHP files trigger server-side errors or warnings when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/rajoshik-post-feature-image-from-url/image-from-url.php:18

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
2 plugin tags: set feature image from url, upload image from image url

rajoshik-post-feature-image-from-url/image-from-url.php 92% from 13 tests

The primary PHP file in "aaM Upload Feature Image From URL" version 1.2 is used by WordPress to initiate all plugin functionality
The following require your attention:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("rajoshik-post-feature-image-from-url.php" instead of "image-from-url.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of programming languages used in this plugin; dangerous file extensions are not allowed
Good job! No executable or dangerous file extensions detected87 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP2442387

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.30
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%
Functions5
▷ Named functions5100.00%
▷ Anonymous functions00.00%
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
There are no PNG files in this plugin