77% cwo-photo

Code Review | CWO Photo

WordPress plugin CWO Photo scored77%from 54 tests.

About plugin

  • Plugin page: cwo-photo
  • Plugin version: 0.1
  • PHP version: 7.4.16
  • WordPress compatibility: 5.0-5.8
  • WordPress version: 6.3.1
  • First release: Aug 12, 2020
  • Latest release: Jul 12, 2021
  • Number of updates: 12
  • Update frequency: every 40.5 days
  • Top authors: paulmiernathan (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /4,047 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.13MB] [CPU: ▲0.27ms] Passed 4 tests

Server-side resources used by CWO Photo
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.59 ▲0.1338.44 ▼2.98
Dashboard /wp-admin3.43 ▲0.1348.54 ▼2.14
Posts /wp-admin/edit.php3.55 ▲0.1950.35 ▲2.41
Add New Post /wp-admin/post-new.php6.01 ▲0.1395.92 ▲3.78
Media Library /wp-admin/upload.php3.36 ▲0.1339.56 ▲6.76
CWO Photo PRO /wp-admin/admin.php?page=cwo_photo_pro3.3234.76
Albums Google Photos /wp-admin/admin.php?page=cwo_photo_albums_google3.3033.91
Credentials /wp-admin/admin.php?page=cwo_photo_credentials3.3031.24
CWO Photo /wp-admin/admin.php?page=cwo_photo_google_id3.3229.37

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

How much does this plugin use your filesystem and database?
No storage issues were detected
Filesystem: 11 new files
Database: 1 new table, 6 new options
New tables
wp_cwo_photo_settings
New WordPress options
widget_recent-comments
widget_theysaidso_widget
theysaidso_admin_options
db_upgraded
widget_recent-posts
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for CWO Photo
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,835 ▲10013.61 ▼0.761.59 ▼0.2841.23 ▼8.12
Dashboard /wp-admin2,244 ▲564.87 ▼1.03113.63 ▲0.0240.60 ▼6.26
Posts /wp-admin/edit.php2,124 ▲352.03 ▲0.0639.96 ▲4.0534.39 ▼1.60
Add New Post /wp-admin/post-new.php1,565 ▲4623.26 ▲0.18665.37 ▲0.4753.57 ▼5.42
Media Library /wp-admin/upload.php1,420 ▲294.25 ▲0.01104.32 ▲11.1146.69 ▲3.05
CWO Photo PRO /wp-admin/admin.php?page=cwo_photo_pro8042.0526.5227.80
Albums Google Photos /wp-admin/admin.php?page=cwo_photo_albums_google7932.1823.9226.00
Credentials /wp-admin/admin.php?page=cwo_photo_credentials8262.0323.1225.27
CWO Photo /wp-admin/admin.php?page=cwo_photo_google_id8072.0524.6026.36

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
The following items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • widget_recent-posts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors 0% from 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Smoke test failed, please fix the following
  • 3 occurences, only the last one shown
    • > GET request to /wp-admin/admin.php?page=cwo_photo_credentials
    • > Notice in wp-content/plugins/cwo-photo/cwo_photo.php+218
    Trying to access array offset on value of type null
    • > GET request to /wp-admin/admin.php?page=cwo_photo_credentials
    • > Notice in wp-content/plugins/cwo-photo/cwo_photo.php+194
    Undefined index: action

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 register_activation_hook() in wp-content/plugins/cwo-photo/cwo_photo.php:25

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

readme.txt 88% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
Attributes that require attention:
  • Donate link: Please fix this invalid URI: ""
  • Screenshots: Screenshot #1 (2.) image required
Please take inspiration from this readme.txt

cwo-photo/cwo_photo.php 85% from 13 tests

The entry point to "CWO Photo" version 0.1 is a PHP file that has certain tags in its header comment area
Please take the time to fix the following:
  • Text Domain: Please use dashes and lowercase characters for text domains
  • Main file name: Please rename the main PHP file in this plugin to the plugin slug ("cwo-photo.php" instead of "cwo_photo.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
No dangerous file extensions were detected1,141 lines of code in 6 files:
LanguageFilesBlank linesComment linesLines of code
PHP1190107442
JavaScript26749382
PO File177162159
CSS2338158

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.16
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%
Functions11
▷ Named functions11100.00%
▷ Anonymous functions00.00%
Constants0
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

PNG files should be compressed to save space and minimize bandwidth usage
2 PNG files occupy 0.00MB with 0.00MB in potential savings
Potential savings
Compression of 2 random PNG files using pngquant
FileSize - originalSize - compressedSavings
css/images/arrow_left.png0.31KB0.26KB▼ 15.58%
css/images/arrow_right.png0.33KB0.26KB▼ 21.83%