89% nativerent

Code Review | Рекламная платформа Native Rent

WordPress plugin Рекламная платформа Native Rent scored89%from 54 tests.

About plugin

  • Plugin page: nativerent
  • Plugin version: 1.8.4
  • PHP compatiblity: 5.6.20+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9-6.3.2
  • WordPress version: 6.3.1
  • First release: Jul 15, 2020
  • Latest release: Oct 24, 2023
  • Number of updates: 78
  • Update frequency: every 15.7 days
  • Top authors: nativerentplugin (100%)

Code review

54 tests

User reviews

1 review

Install metrics

300+ active /9,165 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | Verifying that this plugin installs correctly without errors
This plugin's installer ran successfully

Server metrics [RAM: ▲0.26MB] [CPU: ▲1.22ms] Passed 4 tests

A check of server-side resources used by Рекламная платформа Native Rent
Server-side resource usage in normal parameters
PageMemory (MB)CPU Time (ms)
Home /3.58 ▲0.1136.11 ▲0.84
Dashboard /wp-admin3.65 ▲0.3446.51 ▼0.77
Posts /wp-admin/edit.php3.70 ▲0.3454.34 ▲7.27
Add New Post /wp-admin/post-new.php6.19 ▲0.3097.96 ▲4.69
Media Library /wp-admin/upload.php3.51 ▲0.2836.79 ▲0.11

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

Input-output and database impact of this plugin
There were no storage issued detected upon installing this plugin
Filesystem: 39 new files
Database: no new tables, 8 new options
New WordPress options
nativerent.invalidToken
widget_recent-posts
widget_recent-comments
can_compress_scripts
nativerent_version
widget_theysaidso_widget
db_upgraded
theysaidso_admin_options

Browser metrics Passed 4 tests

Рекламная платформа Native Rent: an overview of browser usage
This plugin has a minimal impact on browser resources
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,817 ▲7114.36 ▲0.011.66 ▼0.0839.79 ▲0.04
Dashboard /wp-admin2,223 ▲495.66 ▲0.1281.21 ▼5.5783.88 ▲42.66
Posts /wp-admin/edit.php2,131 ▲312.01 ▼0.0239.15 ▲0.9234.02 ▼4.94
Add New Post /wp-admin/post-new.php1,552 ▲2423.57 ▲0.52666.96 ▲29.4045.98 ▼4.88
Media Library /wp-admin/upload.php1,428 ▲284.20 ▲0.0392.13 ▼1.4180.88 ▲37.72

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
The following items require your attention
  • This plugin did not uninstall successfully, leaving 6 options in the database
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • can_compress_scripts
    • widget_recent-comments
    • db_upgraded
    • widget_recent-posts

Smoke tests Passed 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Good news, no errors were detected

SRP Passed 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
Looking good! No server-side errors or output on direct access of PHP files

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 90% from 29 tests

readme.txt Passed 16 tests

Perhaps the most important file in your plugin readme.txt gets parsed in order to generate the public listing of your plugin
4 plugin tags: advertising, website income, cpm, marketing

nativerent/nativerent.php 77% from 13 tests

"Рекламная платформа Native Rent" version 1.8.4's main PHP file describes plugin functionality and also serves as the entry point to any WordPress functionality
Please take the time to fix the following:
  • Text Domain: You no longer need to specify the text domain since WordPress 4.6; it must be the same as the plugin slug
  • Description: Please keep the plugin description shorter than 140 characters (currently 489 characters long)
  • Domain Path: The domain path points to an invalid folder, "/languages/" does not exist

Code Analysis Passed 3 tests

File types Passed 1 test

🔸 Test weight: 35 | A short review of files and their extensions; it is not recommended to include executable files
No dangerous file extensions were detected5,532 lines of code in 36 files:
LanguageFilesBlank linesComment linesLines of code
PHP307832,3314,841
JavaScript4613469
CSS1390189
XML16733

PHP code Passed 2 tests

This is a very shot review of cyclomatic complexity and code structure
Everything seems fine, there were no complexity issues found
Cyclomatic complexity
Average complexity per logical line of code0.48
Average class complexity24.30
▷ Minimum class complexity2.00
▷ Maximum class complexity211.00
Average method complexity3.15
▷ Minimum method complexity1.00
▷ Maximum method complexity33.00
Code structure
Namespaces2
Interfaces0
Traits0
Classes27
▷ Abstract classes00.00%
▷ Concrete classes27100.00%
▷ Final classes00.00%
Methods292
▷ Static methods15452.74%
▷ Public methods16957.88%
▷ Protected methods3511.99%
▷ Private methods8830.14%
Functions15
▷ Named functions960.00%
▷ Anonymous functions640.00%
Constants63
▷ Global constants812.70%
▷ Class constants5587.30%
▷ Public constants55100.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 compressed PNG file occupies 0.00MB
Potential savings
Compression of 1 random PNG file using pngquant
FileSize - originalSize - compressedSavings
admin/static/icon.png0.40KB0.38KB▼ 4.90%