84% photo-feed-tookapic

Code Review | Photo Feed - Tookapic

WordPress plugin Photo Feed - Tookapic scored84%from 54 tests.

About plugin

  • Plugin page: photo-feed-tookapic
  • Plugin version: 0.2.2
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.9.5
  • WordPress version: 6.3.1
  • First release: Aug 17, 2018
  • Latest release: Jun 12, 2019
  • Number of updates: 11
  • Update frequency: every 27.2 days
  • Top authors: rafalosinski (100%)

Code review

54 tests

User reviews

1 review

Install metrics

40+ active /595 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
The plugin installed gracefully, with no errors

Server metrics [RAM: ▲0.09MB] [CPU: ▼0.60ms] Passed 4 tests

Analyzing server-side resources used by Photo Feed - Tookapic
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /3.56 ▲0.1045.41 ▲4.87
Dashboard /wp-admin3.40 ▲0.0950.52 ▼0.01
Posts /wp-admin/edit.php3.51 ▲0.1551.73 ▼3.70
Add New Post /wp-admin/post-new.php5.98 ▲0.0995.25 ▼3.56
Media Library /wp-admin/upload.php3.32 ▲0.0943.61 ▲8.23

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

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

Browser metrics Passed 4 tests

Photo Feed - Tookapic: an overview of browser usage
There were no issues detected in relation to browser resource usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,791 ▲3014.60 ▲0.041.76 ▼0.2342.91 ▼4.51
Dashboard /wp-admin2,198 ▲215.65 ▲0.1095.08 ▼0.6041.76 ▲2.82
Posts /wp-admin/edit.php2,103 ▲32.02 ▲0.0142.74 ▲0.4234.50 ▼2.28
Add New Post /wp-admin/post-new.php1,549 ▲423.25 ▲0.02671.46 ▲2.3453.58 ▼0.79
Media Library /wp-admin/upload.php1,403 ▼04.19 ▼0.0398.23 ▼3.7040.14 ▼3.68

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
  • The uninstall procedure has failed, leaving 6 options in the database
    • can_compress_scripts
    • widget_recent-comments
    • theysaidso_admin_options
    • widget_theysaidso_widget
    • db_upgraded
    • 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
Everything seems fine, however this is by no means an exhaustive test

SRP 50% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle: PHP files have to remain inert when accessed directly, throwing no errors and performing no actions
Please fix the following
  • 1× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Class 'WP_Widget' not found in wp-content/plugins/photo-feed-tookapic/includes/class-photo-feed-tookapic-widget.php:6

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine, but this is not an exhaustive test

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

You should put a lot of thought into formatting readme.txt as it is used by WordPress.org to prepare the public listing of your plugin
4 plugin tags: tookapic, photos, feed, widget

photo-feed-tookapic/photo-feed-tookapic.php 92% from 13 tests

This is the main PHP file of "Photo Feed - Tookapic" version 0.2.2, providing information about the plugin in the header fields and serving as the principal entry point to the plugin's functions
You should first fix the following items:
  • Text Domain: The text domain should only use lowercase characters and dashes

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are not allowed as they can serve as attack vectors
There were no executable files found in this plugin628 lines of code in 14 files:
LanguageFilesBlank linesComment linesLines of code
PHP11177508389
CSS14132191
PO File261048

PHP code Passed 2 tests

Analyzing logical lines of code, cyclomatic complexity, and other code metrics
Although this was not an exhaustive test, there were no cyclomatic complexity issues detected
Cyclomatic complexity
Average complexity per logical line of code0.27
Average class complexity5.88
▷ Minimum class complexity1.00
▷ Maximum class complexity30.00
Average method complexity2.11
▷ Minimum method complexity1.00
▷ Maximum method complexity16.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes8
▷ Abstract classes00.00%
▷ Concrete classes8100.00%
▷ Final classes00.00%
Methods35
▷ Static methods25.71%
▷ Public methods3085.71%
▷ Protected methods00.00%
▷ Private methods514.29%
Functions4
▷ Named functions4100.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
No PNG files were detected