78% wp-photodex

Code Review | WP Photodex

WordPress plugin WP Photodex scored78%from 54 tests.

About plugin

  • Plugin page: wp-photodex
  • Plugin version: 1.0.3
  • PHP compatiblity: 5.5+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.6-4.7
  • WordPress version: 6.3.1
  • First release: Mar 22, 2017
  • Latest release: Mar 28, 2017
  • Number of updates: 9
  • Update frequency: every 0.3 days
  • Top authors: ajskelton (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /486 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
Installer ran successfully

Server metrics [RAM: ▲0.04MB] [CPU: ▲0.25ms] Passed 4 tests

This is a short check of server-side resources used by WP Photodex
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.51 ▲0.0542.70 ▲3.99
Dashboard /wp-admin3.35 ▲0.0452.76 ▲0.35
Posts /wp-admin/edit.php3.40 ▲0.0452.42 ▼3.86
Add New Post /wp-admin/post-new.php5.93 ▲0.05106.42 ▲2.40
Media Library /wp-admin/upload.php3.27 ▲0.0438.44 ▲2.12
Add New /wp-admin/post-new.php?post_type=wp-photodex3.3651.94
All Pokemon Photodex /wp-admin/edit.php?post_type=wp-photodex3.3138.87

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

Analyzing filesystem and database footprints of this plugin
The plugin installed successfully
Filesystem: 20 new files
Database: no new tables, 6 new options
New WordPress options
theysaidso_admin_options
widget_recent-posts
can_compress_scripts
widget_theysaidso_widget
db_upgraded
widget_recent-comments

Browser metrics Passed 4 tests

An overview of browser requirements for WP Photodex
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,821 ▲6014.72 ▲0.111.79 ▼0.1644.71 ▼3.49
Dashboard /wp-admin2,225 ▲455.57 ▼0.0392.50 ▲5.8639.61 ▼4.74
Posts /wp-admin/edit.php2,127 ▲242.00 ▼0.0239.84 ▼0.1037.69 ▼3.91
Add New Post /wp-admin/post-new.php1,549 ▲2323.06 ▼0.22692.09 ▲0.3556.19 ▼1.44
Media Library /wp-admin/upload.php1,427 ▲304.18 ▼0.0597.84 ▲0.9444.44 ▲1.33
Add New /wp-admin/post-new.php?post_type=wp-photodex3,0323.5767.3236.41
All Pokemon Photodex /wp-admin/edit.php?post_type=wp-photodex1,1161.9732.9729.91

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
It is recommended to fix the following
  • The uninstall procedure has failed, leaving 6 options in the database
    • widget_theysaidso_widget
    • can_compress_scripts
    • theysaidso_admin_options
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a short smoke test looking for server-side errors
Good news, no errors were detected

SRP 0% 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× PHP files output text when accessed directly:
    • > /wp-content/plugins/wp-photodex/src/photodex/views/blank.php
    • > /wp-content/plugins/wp-photodex/bootstrap.php
  • 13× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\Custom\\add_action() in wp-content/plugins/wp-photodex/src/photodex/custom/post-type.php:13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\Shortcode\\loop_and_render_pokemon() in wp-content/plugins/wp-photodex/src/photodex/views/container.php:4
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\Template\\get_header() in wp-content/plugins/wp-photodex/src/photodex/template/single-photodex.php:27
    • > PHP Warning
      Use of undefined constant PHOTODEX_TEXT_DOMAIN - assumed 'PHOTODEX_TEXT_DOMAIN' (this will throw an Error in a future version of PHP) in wp-content/plugins/wp-photodex/src/photodex/module.php on line 13
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\Admin\\add_action() in wp-content/plugins/wp-photodex/src/photodex/admin/photodex-posts-page.php:16
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_the_post_thumbnail_url() in wp-content/plugins/wp-photodex/src/photodex/views/single.php:2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function has_post_thumbnail() in wp-content/plugins/wp-photodex/src/photodex/views/pokemon.php:2
    • > PHP Notice
      Undefined variable: i in wp-content/plugins/wp-photodex/src/photodex/views/blank.php on line 2
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\add_action() in wp-content/plugins/wp-photodex/src/photodex/module.php:17
    • > PHP Fatal error
      Uncaught Error: Call to undefined function Ajskelton\\WpPhotodex\\Photodex\\Template\\add_filter() in wp-content/plugins/wp-photodex/src/photodex/template/helpers.php:13

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

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
4 plugin tags: pokemon, pokemon go, photodex, pokedex

wp-photodex/bootstrap.php 92% from 13 tests

The main PHP file in "WP Photodex" ver. 1.0.3 adds more information about the plugin and also serves as the entry point for this plugin
You should first fix the following items:
  • Main file name: Even though not officially enforced, the main plugin file should be the same as the plugin slug ("wp-photodex.php" instead of "bootstrap.php")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | An overview of files in this plugin; executable files are not allowed
Good job! No executable or dangerous file extensions detected1,486 lines of code in 19 files:
LanguageFilesBlank linesComment linesLines of code
PHP151193551,430
CSS12021
JSON10021
Markdown24014

PHP code Passed 2 tests

An short overview of logical lines of code, cyclomatic complexity, and other code metrics
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.27
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
Namespaces7
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%
Functions31
▷ Named functions31100.00%
▷ Anonymous functions00.00%
Constants7
▷ Global constants7100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
No PNG files were detected