78% neptune-real-estate

Code Review | Neptune Real Estate

WordPress plugin Neptune Real Estate scored78%from 54 tests.

About plugin

  • Plugin page: neptune-real-estate
  • Plugin version: 1.0.8
  • PHP version: 7.4.16
  • WordPress compatibility: 4.0.1-4.9.8
  • WordPress version: 6.3.1
  • First release: Aug 22, 2018
  • Latest release: Sep 25, 2018
  • Number of updates: 34
  • Update frequency: every 1.1 days
  • Top authors: Fortisthemes (100%)

Code review

54 tests

User reviews

1 review

Install metrics

90+ active /5,519 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | The install procedure must perform silently
Install script ran successfully

Server metrics [RAM: ▲0.13MB] [CPU: ▼8.62ms] Passed 4 tests

This is a short check of server-side resources used by Neptune Real Estate
Normal server usage
PageMemory (MB)CPU Time (ms)
Home /3.63 ▲0.1740.86 ▼2.27
Dashboard /wp-admin3.46 ▲0.1653.51 ▼1.92
Posts /wp-admin/edit.php3.52 ▲0.1646.39 ▼6.11
Add New Post /wp-admin/post-new.php6.00 ▲0.1287.05 ▼24.17
Media Library /wp-admin/upload.php3.33 ▲0.1038.61 ▲2.11
Add New /wp-admin/post-new.php?post_type=property3.5154.05
amenities /wp-admin/edit-tags.php?taxonomy=amenities&post_type=property3.3236.93
Properties /wp-admin/edit.php?post_type=property3.3736.88
Location /wp-admin/edit-tags.php?taxonomy=location&post_type=property3.3234.22

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

Input-output and database impact of this plugin
No storage issues were detected
Filesystem: 42 new files
Database: no new tables, 6 new options
New WordPress options
widget_theysaidso_widget
widget_recent-posts
theysaidso_admin_options
db_upgraded
widget_recent-comments
can_compress_scripts

Browser metrics Passed 4 tests

This is an overview of browser requirements for Neptune Real Estate
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,943 ▲18213.80 ▼0.5511.12 ▲9.1841.32 ▼3.17
Dashboard /wp-admin2,264 ▲935.66 ▲0.1485.34 ▼4.7981.86 ▲36.21
Posts /wp-admin/edit.php2,169 ▲692.12 ▲0.1040.01 ▼2.8634.67 ▼3.47
Add New Post /wp-admin/post-new.php1,579 ▲5323.06 ▼0.74684.95 ▲0.2664.21 ▲12.49
Media Library /wp-admin/upload.php1,469 ▲664.18 ▼0.14100.72 ▼5.5774.92 ▲27.86
Add New /wp-admin/post-new.php?post_type=property2,4287.63174.26120.13
amenities /wp-admin/edit-tags.php?taxonomy=amenities&post_type=property1,3372.2627.7932.80
Properties /wp-admin/edit.php?post_type=property1,1302.0633.4433.04
Location /wp-admin/edit-tags.php?taxonomy=location&post_type=property1,3432.2927.3433.70

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

🔸 Tests weight: 35 | Verifying that this plugin uninstalls completely without leaving any traces
These items require your attention
  • Zombie WordPress options detected upon uninstall: 6 options
    • widget_recent-posts
    • theysaidso_admin_options
    • db_upgraded
    • widget_theysaidso_widget
    • widget_recent-comments
    • can_compress_scripts

Smoke tests 50% 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)
Even though no errors were found, this is by no means an exhaustive test

SRP 0% 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
  • 2× PHP files output text when accessed directly:
    • > /wp-content/plugins/neptune-real-estate/public/partials/neptune-real-estate-public-display.php
    • > /wp-content/plugins/neptune-real-estate/admin/partials/neptune-real-estate-admin-display.php
  • 7× PHP files trigger errors when accessed directly with GET requests:
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_template_directory() in wp-content/plugins/neptune-real-estate/includes/libraries/TGM/example.php:34
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neptune-real-estate/templates/single-property.php:10
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neptune-real-estate/templates/home-template.php:15
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_filter() in wp-content/plugins/neptune-real-estate/includes/config/class-neptune-real-estate-acf-config.php:6
    • > PHP Fatal error
      Uncaught Error: Call to undefined function add_action() in wp-content/plugins/neptune-real-estate/templates/class-neptune-real-estate-page-template.php:154
    • > PHP Fatal error
      Uncaught Error: Call to undefined function get_header() in wp-content/plugins/neptune-real-estate/templates/properties-template.php:9
    • > PHP Fatal error
      Uncaught Error: Call to undefined function did_action() in wp-content/plugins/neptune-real-estate/includes/libraries/TGM/class-tgm-plugin-activation.php:2016

User-side errors Passed 1 test

🔹 Test weight: 20 | This is a smoke test targeting browser errors/issues
Everything seems fine on the user side

Optimizations

Plugin configuration 93% from 29 tests

readme.txt 94% from 16 tests

The readme.txt file uses markdown syntax to describe your plugin to the world
These attributes need to be fixed:
  • Plugin Name: You should set the name of your plugin on the first line ( === neptune-real-estate === )
The official readme.txt might help

neptune-real-estate/neptune-real-estate.php 92% from 13 tests

The main file in "Neptune Real Estate" v. 1.0.8 serves as a complement to information provided in readme.txt and as the entry point to the plugin
Please take the time to fix the following:
  • Description: Please keep the plugin description shorter than 140 characters (currently 175 characters long)

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | Executable files are considered dangerous and should not be included with any WordPress plugin
Success! There were no dangerous files found in this plugin6,616 lines of code in 34 files:
LanguageFilesBlank linesComment linesLines of code
PHP248362,6665,038
Markdown41850778
XML1416425
CSS36217369
JavaScript24546

PHP code Passed 2 tests

An overview of cyclomatic complexity and code structure
Great job! No cyclomatic complexity issues were detected in this plugin
Cyclomatic complexity
Average complexity per logical line of code0.40
Average class complexity19.90
▷ Minimum class complexity1.00
▷ Maximum class complexity195.00
Average method complexity3.38
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces0
Interfaces0
Traits0
Classes20
▷ Abstract classes00.00%
▷ Concrete classes20100.00%
▷ Final classes00.00%
Methods159
▷ Static methods127.55%
▷ Public methods12377.36%
▷ Protected methods2314.47%
▷ Private methods138.18%
Functions7
▷ Named functions7100.00%
▷ Anonymous functions00.00%
Constants5
▷ Global constants240.00%
▷ Class constants360.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

Using a strong compression for your PNG files is a great way to speed-up your plugin
1 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
public/img/apartment.png0.70KB0.60KB▼ 14.17%