84% photocopier

Code Review | Photocopier

WordPress plugin Photocopier scored84%from 54 tests.

About plugin

  • Plugin page: photocopier
  • Plugin version: 1.3
  • PHP compatiblity: 5.2.4+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Oct 6, 2020
  • Latest release: Jul 9, 2021
  • Number of updates: 18
  • Update frequency: every 15.3 days
  • Top authors: kjellr (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /794 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
Install script ran successfully

Server metrics [RAM: ▲0.02MB] [CPU: ▲1.56ms] Passed 4 tests

This is a short check of server-side resources used by Photocopier
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.48 ▲0.0243.24 ▲1.50
Dashboard /wp-admin3.32 ▲0.0258.02 ▲8.09
Posts /wp-admin/edit.php3.37 ▲0.0251.84 ▲1.14
Add New Post /wp-admin/post-new.php5.90 ▲0.0297.63 ▲2.34
Media Library /wp-admin/upload.php3.24 ▲0.0137.45 ▲1.25

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

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

Browser metrics Passed 4 tests

An overview of browser requirements for Photocopier
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,813 ▲5214.69 ▲0.411.50 ▼0.3142.33 ▼6.58
Dashboard /wp-admin2,206 ▲325.70 ▲0.12107.59 ▲14.9351.00 ▲5.94
Posts /wp-admin/edit.php2,112 ▲122.00 ▼0.0241.24 ▲5.6435.62 ▲1.67
Add New Post /wp-admin/post-new.php1,543 ▲1723.50 ▼0.23643.82 ▼45.0554.19 ▼7.42
Media Library /wp-admin/upload.php1,406 ▲34.05 ▼0.21103.03 ▼2.0843.28 ▼3.33

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
It is recommended to fix the following
  • Zombie WordPress options were found after uninstall: 6 options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 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 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
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/photocopier/index.php:163

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

It's important to format your readme.txt file correctly as it is parsed for the public listing of your plugin
Attributes that need to be fixed:
  • Screenshots: These screenshots lack descriptions #1, #2, #3, #4, #5 in photocopier/assets to your readme.txt
The official readme.txt might help

photocopier/index.php 92% from 13 tests

Analyzing the main PHP file in "Photocopier" version 1.3
You should first fix the following items:
  • Main file name: The principal plugin file should be the same as the plugin slug ("photocopier.php" instead of "index.php")

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
No dangerous file extensions were detected180 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP1165197
CSS1102083

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.07
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

Often times overlooked, PNG files can occupy unnecessary space in your plugin
There are no PNG files in this plugin