77% zoospas-project-for-hakaton

Code Review | Zoospas

WordPress plugin Zoospas scored 77% from 54 tests.

About plugin

  • Plugin page: zoospas-project-f...
  • Plugin version: 0.1.5
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-5.3
  • WordPress version: 6.3.1
  • First release: Jan 22, 2019
  • Latest release: Nov 28, 2019
  • Number of updates: 46
  • Update frequency: every 6.8 days
  • Top authors: borischerepanov (71.74%)teplosup (30.43%)

Code review

54 tests

User reviews

2 reviews

Install metrics

10+ active / 950 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
Install script ran successfully

Server metrics [RAM: ▲0.36MB] [CPU: ▲12.56ms] Passed 4 tests

Analyzing server-side resources used by Zoospas
This plugin has minimal impact on server resources
PageMemory (MB)CPU Time (ms)
Home /3.85 ▲0.3954.29 ▲3.64
Dashboard /wp-admin3.71 ▲0.4073.57 ▲20.92
Posts /wp-admin/edit.php3.74 ▲0.3970.57 ▲21.08
Add New Post /wp-admin/post-new.php6.22 ▲0.34114.81 ▲13.25
Media Library /wp-admin/upload.php3.57 ▲0.3453.48 ▲12.44
Add pet /wp-admin/admin.php?page=/wp-admin/post-new.php?post_type=zs_pets3.4043.61
Support /wp-admin/admin.php?page=zs_support3.5349.91
Admin Panel /wp-admin/admin.php?page=zs_admin3.5350.32
Pets /wp-admin/edit.php?post_type=zs_pets3.6656.41

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

A short overview of filesystem and database impact
The plugin installed successfully
Filesystem: 30 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
theysaidso_admin_options
can_compress_scripts
widget_recent-comments
widget_recent-posts
db_upgraded

Browser metrics Passed 4 tests

An overview of browser requirements for Zoospas
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,847 ▲4713.36 ▼1.481.77 ▼0.0344.19 ▼0.06
Dashboard /wp-admin2,245 ▲394.86 ▲0.01111.53 ▼3.7543.21 ▼3.07
Posts /wp-admin/edit.php2,128 ▲362.01 ▼0.0440.32 ▲0.9236.08 ▼0.75
Add New Post /wp-admin/post-new.php1,565 ▲2320.96 ▲2.69754.58 ▲37.7861.42 ▼5.26
Media Library /wp-admin/upload.php1,427 ▲394.17 ▼0.0097.28 ▼8.2143.13 ▲1.79
Add pet /wp-admin/admin.php?page=/wp-admin/post-new.php?post_type=zs_pets280.440.094.01
Support /wp-admin/admin.php?page=zs_support7902.0224.9125.99
Admin Panel /wp-admin/admin.php?page=zs_admin9912.0524.4828.39
Pets /wp-admin/edit.php?post_type=zs_pets1,0922.0030.9330.67

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

🔸 Tests weight: 35 | It is important to correctly uninstall your plugin, without leaving any traces
Please fix the following items
  • This plugin does not fully uninstall, leaving 6 options in the database
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-posts
    • widget_theysaidso_widget
    • widget_recent-comments
    • db_upgraded

Smoke tests 50% 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 | It is important to ensure that your PHP files perform no action when accessed directly, respecting the single-responsibility principle
Please fix the following items
  • 16× GET requests to PHP files have triggered server-side errors or warnings (only 10 are shown):
    • > PHP Warning
      require_once(ZOOSPAS_PLUGIN_DIR/admin-pages/fieldset.php): failed to open stream: No such file or directory in wp-content/plugins/zoospas-project-for-hakaton/admin-pages/functions.php on line 7
    • > PHP Fatal error
      require_once(): Failed opening required 'ZOOSPAS_PLUGIN_DIR/admin-pages/fieldset.php' (include_path='.:/usr/share/php') in wp-content/plugins/zoospas-project-for-hakaton/admin-pages/functions.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zoospas-project-for-hakaton/front-pages/events-single-page.php:5
    • > PHP Fatal error
      require_once(): Failed opening required 'ZOOSPAS_PLUGIN_DIR/shortcodes/filter.php' (include_path='.:/usr/share/php') in wp-content/plugins/zoospas-project-for-hakaton/shortcodes/functions.php on line 7
    • > PHP Warning
      Use of undefined constant ABSPATH - assumed 'ABSPATH' (this will throw an Error in a future version of PHP) in wp-content/plugins/zoospas-project-for-hakaton/zoospas.php on line 22
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zoospas-project-for-hakaton/front-pages/events.php:8
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/zoospas-project-for-hakaton/templates/single.php:6
    • > PHP Warning
      require_once(ZOOSPAS_PLUGIN_DIR/shortcodes/filter.php): failed to open stream: No such file or directory in wp-content/plugins/zoospas-project-for-hakaton/shortcodes/functions.php on line 7
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/zoospas-project-for-hakaton/assets/functions.php:7
    • > PHP Warning
      Use of undefined constant ZOOSPAS_PLUGIN_DIR - assumed 'ZOOSPAS_PLUGIN_DIR' (this will throw an Error in a future version of PHP) in wp-content/plugins/zoospas-project-for-hakaton/shortcodes/functions.php on line 7

User-side errors 0% from 1 test

🔹 Test weight: 20 | This is just a short smoke test looking for browser issues
There are user-side issues you should fix
    • > GET request to /wp-admin/admin.php?page=/wp-admin/post-new.php?post_type=zs_pets
    • > Network (severe)
    wp-admin/admin.php?page=/wp-admin/post-new.php?post_type=zs_pets - Failed to load resource: the server responded with a status of 403 (Forbidden)

Optimizations

Plugin configuration 86% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file describes your plugin functionality and requirements and it is parsed to prepare the your plugin's listing
Attributes that need to be fixed:
  • License uri: Invalid URI ("")
You can take inspiration from this readme.txt

zoospas-project-for-hakaton/zoospas.php 77% from 13 tests

The primary PHP file in "Zoospas" version 0.1.5 is used by WordPress to initiate all plugin functionality
It is important to fix the following:
  • Description: Keep the plugin description shorter than 140 characters (currently 209 characters long)
  • Text Domain: If you choose to specify the text domain, it must be the same as the plugin slug; optional since WordPress version 4.6
  • Main file name: The principal plugin file should be the same as the plugin slug ("zoospas-project-for-hakaton.php" instead of "zoospas.php")

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
No dangerous file extensions were detected5,880 lines of code in 25 files:
LanguageFilesBlank linesComment linesLines of code
CSS2162403,857
PHP165121941,240
Markdown11650387
JavaScript56851244
PO File16860152

PHP code Passed 2 tests

This plugin's cyclomatic complexity and code structure detailed below
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.15
Average class complexity6.00
▷ Minimum class complexity1.00
▷ Maximum class complexity10.00
Average method complexity1.74
▷ Minimum method complexity1.00
▷ Maximum method complexity6.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes4
▷ Abstract classes00.00%
▷ Concrete classes4100.00%
▷ Final classes00.00%
Methods25
▷ Static methods2392.00%
▷ Public methods25100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions78
▷ Named functions6178.21%
▷ Anonymous functions1721.79%
Constants6
▷ Global constants6100.00%
▷ Class constants00.00%
▷ Public constants00.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
There are no PNG files in this plugin