84% daily-image

Code Review | Daily Image

WordPress plugin Daily Image scored84%from 54 tests.

About plugin

  • Plugin page: daily-image
  • Plugin version: 1.0
  • PHP version: 7.4.16
  • WordPress compatibility: 4.5-4.7
  • WordPress version: 6.3.1
  • First release: Jan 14, 2017
  • Latest release: Jan 16, 2017
  • Number of updates: 3
  • Update frequency: every 17.0 days
  • Top authors: samhotchkiss (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /1,386 total downloads


Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
The plugin installed successfully, without throwing any errors or notices

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

A check of server-side resources used by Daily Image
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.49 ▲0.0237.53 ▼6.39
Dashboard /wp-admin3.33 ▲0.0244.13 ▼6.02
Posts /wp-admin/edit.php3.38 ▲0.0248.89 ▼2.24
Add New Post /wp-admin/post-new.php5.91 ▲0.0285.75 ▼6.38
Media Library /wp-admin/upload.php3.25 ▲0.0234.68 ▲0.75
Daily Image /wp-admin/edit.php?page=daily_image3.2330.00

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

A short overview of filesystem and database impact
No storage issues were detected
Filesystem: 12 new files
Database: no new tables, 6 new options
New WordPress options

Browser metrics Passed 4 tests

This is an overview of browser requirements for Daily Image
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,804 ▲6914.79 ▲0.401.71 ▼0.0740.39 ▼7.69
Dashboard /wp-admin2,207 ▲225.82 ▼0.05107.33 ▲5.4739.65 ▼4.75
Posts /wp-admin/edit.php2,090 ▲12.00 ▲0.0237.16 ▼4.6034.97 ▼1.14
Add New Post /wp-admin/post-new.php1,536 ▲323.52 ▲0.22646.73 ▲12.6055.64 ▼0.01
Media Library /wp-admin/upload.php1,392 ▲104.20 ▲0.0198.50 ▼0.8543.55 ▲0.29
Daily Image /wp-admin/edit.php?page=daily_image8141.9626.6224.98

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_recent-comments
    • can_compress_scripts
    • db_upgraded
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no server-side errors were triggered
Even though no errors were found, 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
The following issues need your attention
  • 2× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/daily-image/daily-image.php:23
    • > PHP Fatal error
      Uncaught Error: Call to undefined function di_get_unattached_and_lonely() in wp-content/plugins/daily-image/admin-ui.php:3

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)
There were no browser issues found


Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
3 plugin tags: photography, postbot, photo posting

daily-image/daily-image.php Passed 13 tests

The principal PHP file in "Daily Image" v. 1.0 is loaded by WordPress automatically on each request
100 characters long description:
Easily create a photo post every day featuring the unattached media in your WordPress media library.

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | This is a short overview of programming languages used in this plugin, detecting executable files
Success! There were no dangerous files found in this plugin377 lines of code in 3 files:
LanguageFilesBlank linesComment linesLines of code

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There are no cyclomatic complexity problems detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.30
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
▷ Abstract classes00.00%
▷ Concrete classes00.00%
▷ Final classes00.00%
▷ Static methods00.00%
▷ Public methods00.00%
▷ Protected methods00.00%
▷ Private methods00.00%
▷ Named functions6100.00%
▷ Anonymous functions00.00%
▷ Global constants00.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size 50% from 2 tests

Image compression 50% from 2 tests

Often times overlooked, PNG files can occupy unnecessary space in your plugin
7 PNG files occupy 0.77MB with 0.27MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
images/ui-icons_777620_256x240.png4.44KB4.17KB▼ 6.02%
screenshot-1.png749.54KB274.83KB▼ 63.33%
images/ui-icons_ffffff_256x240.png6.15KB4.17KB▼ 32.13%
images/ui-icons_555555_256x240.png6.82KB4.17KB▼ 38.82%
images/ui-icons_777777_256x240.png6.83KB4.17KB▼ 38.92%