78% annonces

Code Review | Annonces

WordPress plugin Annonces scored78%from 54 tests.

About plugin

  • Plugin page: annonces
  • Plugin version: 2.1.1
  • PHP compatiblity: 5.6+
  • PHP version: 7.4.16
  • WordPress compatibility: 4.9.0-4.9.6
  • WordPress version: 6.3.1
  • First release: Dec 2, 2009
  • Latest release: Jul 27, 2018
  • Number of updates: 55
  • Update frequency: every 57.6 days
  • Top authors: Eoxia (100%)

Code review

54 tests

User reviews

3 reviews

Install metrics

10+ active /12,572 total downloads

Benchmarks

Plugin footprint 83% from 16 tests

Installer Passed 1 test

🔺 Critical test (weight: 50) | All plugins must install correctly, without throwing any errors, warnings, or notices
Install script ran successfully

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

Server-side resources used by Annonces
This plugin does not affect your website's performance
PageMemory (MB)CPU Time (ms)
Home /4.80 ▲1.3460.25 ▲15.79
Dashboard /wp-admin4.31 ▲0.9738.38 ▼26.95
Posts /wp-admin/edit.php4.69 ▲1.3368.61 ▲17.69
Add New Post /wp-admin/post-new.php7.19 ▲1.30108.56 ▼1.95
Media Library /wp-admin/upload.php4.51 ▲1.2858.11 ▲22.42
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins4.6855.01
Announces /wp-admin/edit.php?post_type=announce4.6058.03
Announce taxonomies /wp-admin/edit-tags.php?taxonomy=announce_taxonomy4.5153.94
Labels /wp-admin/edit.php?post_type=label4.6056.12

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

Filesystem and database footprint
This plugin installed successfully
Filesystem: 433 new files
Database: no new tables, 6 new options
New WordPress options
can_compress_scripts
theysaidso_admin_options
widget_recent-comments
widget_theysaidso_widget
db_upgraded
widget_recent-posts

Browser metrics Passed 4 tests

An overview of browser requirements for Annonces
This plugin renders optimally with no browser resource issues detected
PageNodesMemory (MB)Script (ms)Layout (ms)
Home /2,592 ▼15418.34 ▲4.1132.61 ▲30.7844.31 ▼2.29
Dashboard /wp-admin1,839 ▼3677.67 ▲2.75112.64 ▲11.7150.95 ▲8.03
Posts /wp-admin/edit.php2,194 ▲944.15 ▲2.1356.44 ▲15.6941.89 ▲6.69
Add New Post /wp-admin/post-new.php6,527 ▲4,99626.25 ▲2.93993.08 ▲368.6239.92 ▼27.89
Media Library /wp-admin/upload.php1,493 ▲937.20 ▲3.03115.07 ▲20.2052.74 ▲9.23
Install Plugins /wp-admin/plugins.php?page=tgmpa-install-plugins1,0264.3940.7434.95
Announces /wp-admin/edit.php?post_type=announce1,1564.1646.5331.82
Announce taxonomies /wp-admin/edit-tags.php?taxonomy=announce_taxonomy1,3674.5239.6037.99
Labels /wp-admin/edit.php?post_type=label1,1584.1847.1236.00

Uninstaller [IO: ▲0.00MB] [DB: ▲0.01MB] 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
  • Zombie WordPress options were found after uninstall: 6 options
    • widget_theysaidso_widget
    • theysaidso_admin_options
    • widget_recent-posts
    • db_upgraded
    • can_compress_scripts
    • widget_recent-comments

Smoke tests 50% from 4 tests

Server-side errors Passed 1 test

🔹 Test weight: 20 | This is a shallow check for server-side errors
Even though no errors were found, this is by no means an exhaustive test

SRP 0% from 2 tests

🔹 Tests weight: 20 | The single-responsibility principle applies for WordPress plugins as well - please make sure your PHP files perform no actions when accessed directly
The following issues need your attention
  • 1× PHP files output non-empty strings when accessed directly via GET requests:
    • > /wp-content/plugins/annonces/core/external/eo-framework/tests/bootstrap.php
  • 3× GET requests to PHP files trigger server-side errors or Error 500 responses:
    • > PHP Fatal error
      Uncaught Error: Class 'eoxia\\Singleton_Util' not found in wp-content/plugins/annonces/core/class/class-tgm-plugin-activation.php:50
    • > PHP Fatal error
      Uncaught Error: Call to undefined function annonces\\plugin_dir_path() in wp-content/plugins/annonces/annonces.php:19
    • > PHP Fatal error
      Uncaught Error: Class 'WP_UnitTestCase' not found in wp-content/plugins/annonces/core/external/eo-framework/tests/test-post-class.php:11

User-side errors Passed 1 test

🔹 Test weight: 20 | Just a short smoke test targeting errors on the browser (console and network errors and warnings)
No browser issues were found

Optimizations

Plugin configuration 96% from 29 tests

readme.txt Passed 16 tests

The readme.txt file is undoubtedly the most important file in your plugin, preparing it for public listing on WordPress.org
There were no plugin tags found

annonces/annonces.php 92% from 13 tests

The primary PHP file in "Annonces" version 2.1.1 is used by WordPress to initiate all plugin functionality
Please make the necessary changes and fix the following:
  • Domain Path: The domain path folder was not found ("/language")

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
Everything looks great! No dangerous files found in this plugin47,349 lines of code in 318 files:
LanguageFilesBlank linesComment linesLines of code
CSS215,08517114,729
Sass1274671797,390
SVG40167,004
JSON20105,843
PHP851,5474,6855,626
JavaScript317522,4274,333
HTML18276351,877
PO File38097244
Markdown51130205
YAML17056
XML34242

PHP code Passed 2 tests

Analyzing cyclomatic complexity and code structure
There were no cyclomatic complexity issued detected
Cyclomatic complexity
Average complexity per logical line of code0.46
Average class complexity13.30
▷ Minimum class complexity1.00
▷ Maximum class complexity206.00
Average method complexity3.56
▷ Minimum method complexity1.00
▷ Maximum method complexity34.00
Code structure
Namespaces4
Interfaces0
Traits0
Classes61
▷ Abstract classes11.64%
▷ Concrete classes6098.36%
▷ Final classes00.00%
Methods293
▷ Static methods165.46%
▷ Public methods23479.86%
▷ Protected methods5117.41%
▷ Private methods82.73%
Functions15
▷ Named functions640.00%
▷ Anonymous functions960.00%
Constants6
▷ Global constants350.00%
▷ Class constants350.00%
▷ Public constants3100.00%

Plugin size Passed 2 tests

Image compression Passed 2 tests

All PNG images should be compressed to minimize bandwidth usage for end users
9 PNG files occupy 0.06MB with 0.04MB in potential savings
Potential savings
Compression of 5 random PNG files using pngquant
FileSize - originalSize - compressedSavings
modules/annonce/asset/img/pin-cyan.png4.29KB0.65KB▼ 84.85%
core/asset/image/structure_plugin.PNG23.27KB9.88KB▼ 57.55%
modules/annonce/asset/img/pin-red.png4.28KB0.66KB▼ 84.66%
modules/annonce/asset/img/pin-black.png4.23KB0.62KB▼ 85.40%
modules/annonce/asset/img/pin-yellow.png4.27KB0.66KB▼ 84.66%