90% sample-images

Code Review | Sample Images

WordPress plugin Sample Images scored90%from 54 tests.

About plugin

  • Plugin page: sample-images
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress version: 6.3.1
  • First release: Apr 13, 2020
  • Latest release: Apr 13, 2020
  • Number of updates: 4
  • Update frequency: every 2.3 days
  • Top authors: leandroberg (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /432 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

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

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

A check of server-side resources used by Sample Images
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.72 ▼0.0131.23 ▼15.89
Dashboard /wp-admin3.57 ▲0.0149.54 ▼5.91
Posts /wp-admin/edit.php3.69 ▲0.0149.05 ▼1.55
Add New Post /wp-admin/post-new.php6.15 ▲0.0186.99 ▼21.63
Media Library /wp-admin/upload.php3.49 ▲0.0134.60 ▼4.51

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 4 new files
Database: no new tables, 6 new options
New WordPress options
db_upgraded
widget_recent-comments
theysaidso_admin_options
can_compress_scripts
widget_recent-posts
widget_theysaidso_widget

Browser metrics Passed 4 tests

Checking browser requirements for Sample Images
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,873 ▲11213.46 ▼0.819.56 ▲7.4141.50 ▼1.39
Dashboard /wp-admin2,195 ▲185.66 ▼0.0385.70 ▼10.8440.65 ▼4.00
Posts /wp-admin/edit.php2,100 ▼02.06 ▲0.0736.56 ▲1.3233.84 ▼1.23
Add New Post /wp-admin/post-new.php1,536 ▲1023.37 ▲5.86664.18 ▼17.6965.48 ▲9.88
Media Library /wp-admin/upload.php1,400 ▼04.29 ▲0.10101.97 ▼5.6346.55 ▼2.96

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 did not uninstall successfully, 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 Passed 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 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
No output text or server-side errors detected on direct access of PHP files

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 Passed 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
4 plugin tags: images, staging, placeholder, sample

sample-images/sample-images.php Passed 13 tests

The principal PHP file in "Sample Images" v. 1.0 is loaded by WordPress automatically on each request
101 characters long description:
Runtime media path replacement, used for generate sample images on front side, without any db changes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is an overview of file extensions present in this plugin and a short test that no dangerous files are bundled with this plugin
Everything looks great! No dangerous files found in this plugin30 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1101121
JavaScript1209

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.20
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%
Functions3
▷ Named functions00.00%
▷ Anonymous functions3100.00%
Constants1
▷ Global constants1100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin