84% cyprus-pharmacies

Code Review | Cyprus Pharmacies

WordPress plugin Cyprus Pharmacies scored84%from 54 tests.

About plugin

  • Plugin page: cyprus-pharmacies
  • Plugin version: 1.2.1
  • PHP compatiblity: 7.2+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.3-6.2
  • WordPress version: 6.3.1
  • First release: Jan 7, 2022
  • Latest release: Mar 31, 2023
  • Number of updates: 13
  • Update frequency: every 43.2 days
  • Top authors: savvasha (100%)

Code review

54 tests

User reviews

1 review

Install metrics

10+ active /883 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.01MB] [CPU: ▼8.88ms] Passed 4 tests

This is a short check of server-side resources used by Cyprus Pharmacies
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.46 ▲0.0036.87 ▼7.96
Dashboard /wp-admin3.31 ▼0.0456.09 ▼14.16
Posts /wp-admin/edit.php3.36 ▲0.0045.70 ▼4.28
Add New Post /wp-admin/post-new.php5.89 ▲0.0088.74 ▼9.11
Media Library /wp-admin/upload.php3.23 ▲0.0034.53 ▼2.06

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

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

Browser metrics Passed 4 tests

This is an overview of browser requirements for Cyprus Pharmacies
Minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,840 ▲7913.57 ▼1.012.37 ▲0.6239.45 ▼3.30
Dashboard /wp-admin2,221 ▲214.84 ▼1.02105.01 ▼4.4141.24 ▲0.63
Posts /wp-admin/edit.php2,100 ▲32.03 ▲0.0235.89 ▼0.1837.62 ▲2.06
Add New Post /wp-admin/post-new.php1,544 ▼123.23 ▲0.00666.55 ▲25.7967.05 ▲17.62
Media Library /wp-admin/upload.php1,403 ▲94.20 ▼0.0498.39 ▼5.4945.22 ▲0.76

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

🔸 Tests weight: 35 | Checking the uninstaller removed all traces of the plugin
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments
    • widget_theysaidso_widget

Smoke tests 75% 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 50% from 2 tests

🔹 Tests weight: 20 | SRP (Single-Responsibility Principle) - PHP files must act as libraries and never output text or perform any action when accessed directly in a browser
Please fix the following items
  • 2× GET requests to PHP files have triggered server-side errors or warnings:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function apply_filters() in wp-content/plugins/cyprus-pharmacies/includes/class-cypharm-coordinates.php:319
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_shortcode() in wp-content/plugins/cyprus-pharmacies/includes/class-cypharm-front.php:16

User-side errors Passed 1 test

🔹 Test weight: 20 | A shallow check that no browser errors were triggered
No browser errors were detected

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: pharmacies, pharmacy, cyprus, greek

cyprus-pharmacies/cyprus-pharmacies.php 92% from 13 tests

The entry point to "Cyprus Pharmacies" version 1.2.1 is a PHP file that has certain tags in its header comment area
Please make the necessary changes and fix the following:
  • Requires PHP: Required version must match the one declared in readme.txt ("5.6.40" instead of "7.2")

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short glimpse at programming languages used with this plugin and a check that no dangerous files are present
Success! There were no dangerous files found in this plugin457 lines of code in 4 files:
LanguageFilesBlank linesComment linesLines of code
PHP45093457

PHP code Passed 2 tests

A short review of cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.32
Average class complexity9.00
▷ Minimum class complexity1.00
▷ Maximum class complexity18.00
Average method complexity5.00
▷ Minimum method complexity1.00
▷ Maximum method complexity18.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes3
▷ Abstract classes00.00%
▷ Concrete classes3100.00%
▷ Final classes00.00%
Methods6
▷ Static methods00.00%
▷ Public methods6100.00%
▷ Protected methods00.00%
▷ Private methods00.00%
Functions0
▷ Named functions00.00%
▷ Anonymous functions00.00%
Constants1
▷ Global constants1100.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
1 PNG file occupies 0.10MB with 0.04MB in potential savings
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
screenshot-1.png99.40KB53.63KB▼ 46.05%