94% astrology

Code Review | Astrology

WordPress plugin Astrology scored 94% from 54 tests.

About plugin

  • Plugin page: astrology
  • Plugin version: 1.0.6
  • PHP compatiblity: 7.2.0+
  • PHP version: 7.4.16
  • WordPress compatibility: 5.5-5.8.3
  • WordPress version: 5.9.2
  • First release: Apr 13, 2021
  • Latest release: Jan 18, 2022
  • Number of updates: 17
  • Update frequency: every 24.2 days
  • Top authors: prokerala (100%)

Code review

54 tests

User reviews

1 review

Install metrics

100+ active / 1,165 total downloads

Benchmarks

Plugin footprint Passed 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Checking the installer triggered no errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.34MB] [CPU: ▼296.76ms] Passed 4 tests

An overview of server-side resources used by Astrology
No issues were detected with server-side resource usage
PageMemory (MB)CPU Time (ms)
Home /3.89 ▲0.3554.68 ▲3.17
Dashboard /wp-admin3.80 ▲0.3636.27 ▲2.12
Posts /wp-admin/edit.php4.02 ▲0.3539.64 ▲1.03
Add New Post /wp-admin/post-new.php7.32 ▲0.3294.28 ▼1,193.34
Media Library /wp-admin/upload.php3.75 ▲0.4226.71 ▲3.34

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

Input-output and database impact of this plugin
This plugin was installed successfully
Filesystem: 446 new files
Database: no new tables, no new options

Browser metrics Passed 4 tests

An overview of browser requirements for Astrology
Normal browser usage
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /3,854 ▲10016.01 ▲0.316.97 ▼0.292.45 ▼0.90
Dashboard /wp-admin2,922 ▲686.28 ▲0.08118.61 ▼16.90150.09 ▼11.74
Posts /wp-admin/edit.php2,722 ▲283.23 ▲0.0062.83 ▼0.15138.43 ▼4.55
Add New Post /wp-admin/post-new.php1,691 ▲116.87 ▼3.64424.66 ▼15.02171.74 ▲12.48
Media Library /wp-admin/upload.php1,732 ▲375.64 ▲0.17142.53 ▼2.84184.90 ▼8.28

Uninstaller [IO: ▲0.00MB] [DB: ▲0.00MB] Passed 4 tests

🔸 Tests weight: 35 | All plugins must uninstall correctly, removing their source code and extra database tables they might have created
Uninstall script ran successfully

Smoke tests 75% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the server (in the Apache logs)
The smoke test was a success, however most plugin functionality was not tested

SRP 50% from 2 tests

🔹 Tests weight: 20 | A shallow check of the single-responsibility principle; PHP files should perform no action - including output of placeholder text - and trigger no errors when accessed directly
Almost there! Just fix the following items
  • 255× GET requests to PHP files trigger server-side errors or Error 500 responses (only 10 are shown):
    • > PHP Fatal error
      Uncaught Error: Interface 'Prokerala\\Astrology\\Vendor\\Buzz\\Exception\\ExceptionInterface' not found in wp-content/plugins/astrology/dependencies/vendor/kriswallsmith/buzz/lib/Exception/ClientException.php:10
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/prepend.inc.php on line 17
    • > PHP Fatal error
      Uncaught Error: Class 'Prokerala\\Astrology\\Vendor\\Buzz\\Client\\AbstractCurl' not found in wp-content/plugins/astrology/dependencies/vendor/kriswallsmith/buzz/lib/Client/Curl.php:11
    • > PHP Fatal error
      Uncaught Error: Class 'Prokerala\\Astrology\\Vendor\yholm\\Psr7\\Factory\\Psr17Factory' not found in wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/prepend.inc.php:22
    • > PHP Warning
      include(): Failed opening 'wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/vendor/autoload.php' for inclusion (include_path='.:/usr/share/php') in wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/prepend.inc.php on line 17
    • > PHP Fatal error
      Uncaught Error: Interface 'Psr\\SimpleCache\\CacheInterface' not found in wp-content/plugins/astrology/dependencies/vendor/symfony/cache/Simple/TraceableCache.php:23
    • > PHP Fatal error
      Uncaught Error: Class 'Prokerala\\Astrology\\Vendor\yholm\\Psr7\\Factory\\Psr17Factory' not found in wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/prepend.inc.php:22
    • > PHP Fatal error
      Uncaught Error: Interface 'Prokerala\\Astrology\\Vendor\\Buzz\\Exception\\ExceptionInterface' not found in wp-content/plugins/astrology/dependencies/vendor/kriswallsmith/buzz/lib/Exception/InvalidArgumentException.php:9
    • > PHP Fatal error
      Uncaught Error: Interface 'Prokerala\\Api\\Astrology\\Result\\ResultInterface' not found in wp-content/plugins/astrology/dependencies/vendor/prokerala/astrology-sdk/src/Api/Astrology/Result/Horoscope/Papasamyam.php:16
    • > PHP Fatal error
      Uncaught Error: Interface 'Prokerala\\WP\\Astrology\\Front\\ReportControllerInterface' not found in wp-content/plugins/astrology/src/Front/Report/PanchangController.php:41

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
There were no browser issues found

Optimizations

Plugin configuration Passed 29 tests

readme.txt Passed 16 tests

The readme.txt file is an important file in your plugin as it is parsed by WordPress.org to prepare the public listing of your plugin
2 plugin tags: astrology, prokerala

astrology/astrology.php Passed 13 tests

The entry point to "Astrology" version 1.0.6 is a PHP file that has certain tags in its header comment area
68 characters long description:
Integrate astrology calculators powered by Prokerala's Astrology API

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | There should be no dangerous file extensions present in any WordPress plugin
There were no executable files found in this plugin22,262 lines of code in 439 files:
LanguageFilesBlank linesComment linesLines of code
PHP4321,54614,75521,800
CSS2795306
JavaScript522155156

PHP code Passed 2 tests

Cyclomatic complexity and code structure are the fingerprint of this plugin
No cyclomatic complexity issues were detected for this plugin
Cyclomatic complexity
Average complexity per logical line of code0.39
Average class complexity8.37
▷ Minimum class complexity1.00
▷ Maximum class complexity161.00
Average method complexity2.56
▷ Minimum method complexity1.00
▷ Maximum method complexity49.00
Code structure
Namespaces79
Interfaces61
Traits27
Classes281
▷ Abstract classes93.20%
▷ Concrete classes27296.80%
▷ Final classes11241.18%
Methods1,650
▷ Static methods613.70%
▷ Public methods1,39584.55%
▷ Protected methods1106.67%
▷ Private methods1458.79%
Functions113
▷ Named functions1614.16%
▷ Anonymous functions9785.84%
Constants191
▷ Global constants52.62%
▷ Class constants18697.38%
▷ Public constants17795.16%

Plugin size Passed 2 tests

Image compression Passed 2 tests

It is recommended to compress PNG files in your plugin to minimize bandwidth usage
No PNG files were detected