83% wopo-mockup-maker

Code Review | WoPo Mockup Maker - Device Mockup

WordPress plugin WoPo Mockup Maker - Device Mockup scored83%from 54 tests.

About plugin

  • Plugin page: wopo-mockup-maker
  • Plugin version: 1.0.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.2-6.1
  • WordPress version: 6.3.1
  • First release: Sep 14, 2021
  • Latest release: Dec 30, 2022
  • Number of updates: 9
  • Update frequency: every 52.5 days
  • Top authors: thanhbinh8703 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

20+ active /486 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 successfully, without throwing any errors or notices

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

An overview of server-side resources used by WoPo Mockup Maker - Device Mockup
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.47 ▲0.0134.70 ▼9.30
Dashboard /wp-admin3.31 ▲0.0145.51 ▼4.40
Posts /wp-admin/edit.php3.36 ▲0.0146.33 ▲2.46
Add New Post /wp-admin/post-new.php5.89 ▲0.0192.69 ▼3.70
Media Library /wp-admin/upload.php3.23 ▲0.0134.08 ▲3.09

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for WoPo Mockup Maker - Device Mockup
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,800 ▲6513.27 ▼1.484.58 ▲2.6343.50 ▼0.43
Dashboard /wp-admin2,209 ▲214.87 ▲0.01109.64 ▼11.4641.54 ▼3.02
Posts /wp-admin/edit.php2,089 ▼02.04 ▼0.0239.43 ▲4.6235.46 ▲0.68
Add New Post /wp-admin/post-new.php1,542 ▲2818.29 ▲0.70620.03 ▼109.8646.57 ▼23.85
Media Library /wp-admin/upload.php1,391 ▲34.26 ▲0.0493.88 ▼17.0142.22 ▼1.20

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
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • db_upgraded
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts
    • widget_theysaidso_widget

Smoke tests 75% from 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 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/wopo-mockup-maker/wopo-mockup-maker.php:17

User-side errors Passed 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
No browser errors were detected

Optimizations

Plugin configuration 83% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Please fix the following attributes:
  • Screenshots: Add descriptions for screenshots #10, #2, #3, #4, #5, #6, #7, #8, #9 in wopo-mockup-maker/assets to your readme.txt
Please take inspiration from this readme.txt

wopo-mockup-maker/wopo-mockup-maker.php 69% from 13 tests

The primary PHP file in "WoPo Mockup Maker - Device Mockup" version 1.0.1 is used by WordPress to initiate all plugin functionality
Please take the time to fix the following:
  • Domain Path: The domain path points to an invalid folder, "/languages" does not exist
  • Requires at least: The required version number did not match the one declared in readme.txt ("4.7" instead of "5.2")
  • Requires PHP: The required version number did not match the one declared in readme.txt ("5.2.4" instead of "7.2")
  • Text Domain: The text domain is optional since WordPress version 4.6; if you do specify it, it must be the same as the plugin slug

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
There were no executable files found in this plugin1,899 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code
CSS23121,867
PHP131432

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.00
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%
Functions1
▷ Named functions1100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
104 PNG files occupy 15.57MB with 8.21MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
assets/device-mockups/iPhone5/portrait_black.png140.66KB65.68KB▼ 53.31%
assets/device-mockups/galaxyTab4/portrait_white.png180.30KB114.17KB▼ 36.68%
assets/device-mockups/galaxyS5/landscape_gold.png174.48KB75.04KB▼ 56.99%
assets/device-mockups/apple_watch/sport/red.png40.32KB20.05KB▼ 50.27%
assets/device-mockups/iPhone7/portrait_red.png16.08KB5.43KB▼ 66.23%