84% photo-credits

Code Review | Photo Credits

WordPress plugin Photo Credits scored84%from 54 tests.

About plugin

  • Plugin page: photo-credits
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 3.3-3.8.1
  • WordPress version: 6.3.1
  • First release: Feb 15, 2014
  • Latest release: Mar 2, 2014
  • Number of updates: 10
  • Update frequency: every 1.7 days
  • Top authors: Sathya12 (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,249 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 gracefully, with no errors

Server metrics [RAM: ▼13.15MB] [CPU: ▼2,725,552.94ms] Passed 4 tests

An overview of server-side resources used by Photo Credits
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.53 ▼52.6741.87 ▼10,902,204.35
Dashboard /wp-admin56.21 ▲52.8210,911,632.17 ▲10,911,565.54
Posts /wp-admin/edit.php3.42 ▲0.0249.43 ▼1.39
Add New Post /wp-admin/post-new.php5.95 ▲0.0286.91 ▼8.41
Media Library /wp-admin/upload.php3.30 ▲0.0237.44 ▲2.39

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 5 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
widget_theysaidso_widget
theysaidso_admin_options
widget_recent-posts
widget_recent-comments
db_upgraded

Browser metrics Passed 4 tests

A check of browser resources used by Photo Credits
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲514.23 ▼0.121.78 ▼0.0645.97 ▲5.62
Dashboard /wp-admin2,189 ▲125.61 ▼0.0497.76 ▲9.0843.11 ▲0.65
Posts /wp-admin/edit.php2,079 ▼182.01 ▲0.0036.87 ▲2.4631.90 ▼8.04
Add New Post /wp-admin/post-new.php1,526 ▼223.51 ▲0.46659.42 ▼18.9263.98 ▲9.25
Media Library /wp-admin/upload.php1,400 ▼34.20 ▼0.0498.49 ▼8.2545.60 ▼0.80

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

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
These items require your attention
  • Zombie WordPress options were found after uninstall: 6 options
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • widget_recent-comments
    • widget_recent-posts
    • db_upgraded

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Please take a closer look at the following
  • 1× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/photo-credits/photo-credits.php:83

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 97% from 29 tests

readme.txt 94% from 16 tests

Often overlooked, readme.txt is one of the most important files in your plugin
These attributes need your attention: The official readme.txt is a good inspiration

photo-credits/photo-credits.php Passed 13 tests

"Photo Credits" version 1.0's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
36 characters long description:
Adding Author credits to Post Images

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 plugin130 lines of code in 2 files:
LanguageFilesBlank linesComment linesLines of code
PHP120042102
CSS10728

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
All good! No complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.29
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%
Functions5
▷ Named functions5100.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
1 PNG file occupies 0.70MB with 0.55MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.PNG719.91KB156.74KB▼ 78.23%