10% simple-picture-view

Code Review | Simple-Picture-View

WordPress plugin Simple-Picture-View scored10%from 54 tests.

About plugin

  • Plugin page: simple-picture-view
  • Plugin version: 1.0.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.0.1-3.9.1
  • WordPress version: 6.3.1
  • First release: May 30, 2014
  • Latest release: Jun 2, 2014
  • Number of updates: 18
  • Update frequency: every 0.2 days
  • Top authors: gerut (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /1,389 total downloads

Benchmarks

Plugin footprint 40% from 16 tests

Installer 0% from 1 test

🔺 Critical test (weight: 50) | It is important to correctly install your plugin, without throwing errors or notices
The following installer errors require your attention
  • The plugin did not install without errors
    • > Deprecated in wp-content/plugins/simple-picture-view/simple-picture-view.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; picture_view has a deprecated constructor

Server metrics [RAM: ▼1.92MB] [CPU: ▼51.06ms] Passed 4 tests

An overview of server-side resources used by Simple-Picture-View
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /2.07 ▼1.394.49 ▼33.29
Dashboard /wp-admin2.09 ▼1.225.71 ▼46.16
Posts /wp-admin/edit.php2.09 ▼1.275.46 ▼38.90
Add New Post /wp-admin/post-new.php2.09 ▼3.806.77 ▼85.87
Media Library /wp-admin/upload.php2.09 ▼1.145.35 ▼29.34

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

Filesystem and database footprint
This plugin was installed successfully
Filesystem: 5 new files
Database: no new tables, 7 new options
New WordPress options
widget_theysaidso_widget
widget_recent-comments
theysaidso_admin_options
db_upgraded
can_compress_scripts
widget_picture_view
widget_recent-posts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Simple-Picture-View
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.23 ▼1.161.86 ▲0.1145.11 ▲0.55
Dashboard /wp-admin2,206 ▲185.88 ▲1.02103.89 ▼11.8638.17 ▼8.09
Posts /wp-admin/edit.php2,089 ▼02.01 ▼0.0339.70 ▲4.5835.61 ▼0.89
Add New Post /wp-admin/post-new.php1,514 ▼1417.66 ▼5.49683.36 ▲0.6159.79 ▲4.54
Media Library /wp-admin/upload.php1,391 ▲94.28 ▲0.0995.43 ▼18.0743.07 ▼3.60

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

🔸 Tests weight: 35 | The uninstall procedure must remove all plugin files and extra database tables
It is recommended to fix the following
  • This plugin cannot be uninstalled
    • > Deprecated in wp-content/plugins/simple-picture-view/simple-picture-view.php+27
    Methods with the same name as their class will not be constructors in a future version of PHP; picture_view has a deprecated constructor
  • This plugin did not uninstall successfully, leaving 7 options in the database
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_picture_view
    • widget_recent-comments
    • can_compress_scripts
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 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
Please fix the following items
  • 1× PHP files trigger server errors when accessed directly:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/simple-picture-view/simple-picture-view.php:27

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 90% from 29 tests

readme.txt 81% from 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
These attributes need to be fixed:
  • Donate link: Invalid URI found ("www.puga.info")
  • Screenshots: These screenshots have no corresponding images in /assets: #1 (The screenshot description corresponds to Wiget_in_footer.(png|jpg|jpeg|gif).), #2 (The screenshot description corresponds to screenshot.(png|jpg|jpeg|gif).)
  • Plugin Name: Please replace "Plugin Name" with the name of your plugin on the first line ( === simple-picture-view === )
The official readme.txt might help

simple-picture-view/simple-picture-view.php Passed 13 tests

"Simple-Picture-View" version 1.0.0's primary PHP file adds more information about the plugin and serves as the entry point for WordPress
29 characters long description:
Shows pictures in the sidebar

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Good job! No executable or dangerous file extensions detected52 lines of code in 1 file:
LanguageFilesBlank linesComment linesLines of code
PHP1162552

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.03
Average class complexity2.00
▷ Minimum class complexity2.00
▷ Maximum class complexity2.00
Average method complexity1.25
▷ Minimum method complexity1.00
▷ Maximum method complexity2.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes1
▷ Abstract classes00.00%
▷ Concrete classes1100.00%
▷ Final classes00.00%
Methods4
▷ Static methods00.00%
▷ Public methods4100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
2 PNG files occupy 0.02MB with 0.01MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
Wiget_in_footer.png10.20KB5.44KB▼ 46.70%
screenshot.png10.20KB5.44KB▼ 46.70%